Re: SOLVED: Limit Members Loop by Profile Fields
Hi there,
how does your code behave in BP 1.5? I am trying to filter members by user role and used the following code:
`
<?php
$user_role = array (
‘role’ => ‘author’,
);
$all_authors = get_users ($user_role);
$members_to_be_included = array ();
foreach ($all_authors as $all_author) {
$members_to_be_included[] = $all_author->ID;
}
?>
`
The problem I run into though is that when I use the filter members by ‘active’, ‘alphabetical’ etc. those filters would not work anymore. Do they work with your code? Will definitely try this out!