bp_has_members returns nothing
- 
		Hi there! I am trying to get all member ids and use them in a function. 
 The following code, placed in the functions.php, returns an empty array.
 Any idea why and how this can be fixed?
 function get_all_members() {
 $memberArray = array();
 if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) {
 while ( bp_members() ) : bp_the_member();
 array_push($memberArray, bp_get_member_user_id());
 endwhile;
 }
 return $memberArray;
 }
 Of course the function is triggered 😉 Thanks in advance! 
Viewing 4 replies - 1 through 4 (of 4 total)
	
Viewing 4 replies - 1 through 4 (of 4 total)
	
- The topic ‘bp_has_members returns nothing’ is closed to new replies.