Reply To: Add a variable in bp_has_members
Why can’t I just copy that function?
function include_by_meta_group($theMetaValue, $theMetaField) {
$memberArray = array();
if (bp_group_has_members()) :
while (bp_group_members()) :
bp_group_the_member();
$theFieldValue = bp_get_member_profile_data( 'field='. $theMetaField );
if ($theFieldValue==$theMetaValue) {
array_push($memberArray, bp_get_member_user_id());
}
endwhile;
endif;
$theIncludeString=implode(",",$memberArray);
return $theIncludeString;
}