[Resolved] bp_has_members( 'user_id=' not returning all friends
-
Hi all,
I use buddypress along with Custom Post Types (as tickets) to manage a social event platform where people can see which friends are going to each event.
I use
<?php $tickets = getTicketsForEvent(get_the_ID()); ?> <div id="members-dir-list" class="members dir-list events-page-member-list"> <ul id="members-list" class="block-grid three-up" role="main"> <?php foreach($tickets as $ticket) { if ( bp_has_members( 'user_id=' . bp_loggedin_user_id() ) ) : while ( bp_members() ) : bp_the_member(); $user_id = bp_get_member_user_id(); if($user_id == $ticket["member"]) { // $ticket["member"] is always the User ID - stored as post meta on ticket $nomembers = false; $nooffriends++; ?> <li> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( 'type=full&width=125&height=125' ); ?></a> </div> <div class="item member-info"> <div class="item-title"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a> </div> <?php do_action( 'bp_directory_members_item' ); ?> </div> <div class="clear"></div> </li> <?php } endwhile; endif; } ?>
The problem is that certain people never turn up in the list… AND even more weird is that people who don’t turn up are different for each person viewing.
For example I never see userID 1543 in the list attending where one of my co-admins can see 1543 but never sees 1665…
Has anyone come across anything like this before?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘[Resolved] bp_has_members( 'user_id=' not returning all friends’ is closed to new replies.