When you say a denied user, what do you mean? BP standalone does not have a feature such as this so it my be that you have a plugin adding this feature and if so I’d ask that plugins developer to filter the mentions list for activity.
Hi,
I am using memberpress plugin for members login/profile with buddypress. And I am using New User approved plugin to approve members. So there are a number of denied users/members, which I don’t want to see in tagging option, as I described above.
You’ll need to use this filter:
apply_filters( 'bp_core_get_suggestions', $retval, $args );
For more info, find that filter in this file:
...wp-content\plugins\buddypress\bp-core\bp-core-functions.php
How you retrieve the ‘denied’ users will depend on how they are handled by the other code or plugins.
If you do not know how to get an array of the denied user ids, you should ask the creators of that other code or plugins.
Can you help me little more?
how I used that filter to remove denied user to mention, denied status is saved in usermeta.
I am some code snippet getting users whose role is subscriber and status is denied/pending to exclude from members directory, members count
$role = ‘subscriber’;// change to the role to be excluded.
$user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );
Is that way I used above filter?