Hello, is it possible to hide some users from user list based on usermeta values? For example I would like to hide all users whose usermeta value is user_disabled=1. How can I do that?
Notifications
Clear all
Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Jun 04, 2019 4:28 pm
4 Replies
Jun 04, 2019 4:48 pm
Hi @sunny,
The wpDiscuz User & Comment Mentioning add-on has the following filter you can use for this purpose:
$users = apply_filters('wpdumc_user_search_result', $users, $postID, $ch_user);
Jun 04, 2019 4:57 pm
hi @astghik, do you have some documentation or usage example on how it should be used in functions.php?
Oct 09, 2019 11:18 pm
I second this question, but would appreciate an actual answer that shows what to do
$users = apply_filters('wpdumc_user_search_result', $users, $postID, $ch_user);
where can we add in the usernames we want to exclude in this code?