Where to locate Users’ numeric Ids?
-
I have to add the following code by Brajesh Singh to my theme’s functions.php to exclude certain members from search results. In the code I have to define their numeric id, as shown in the code. Please help me know where exactly can I find these users’ ids? I’m not able to locate these ids anywhere! Thank you for the support

‘add_action(‘bp_ajax_querystring’,'bpdev_exclude_users’,20,2);
function bpdev_exclude_users($qs=false,$object=false){
//list of users to exclude$excluded_user=’1,2,3′;//comma separated ids of users whom you want to exclude
if($object!=’members’)//hide for members only
return $qs;$args=wp_parse_args($qs);
//check if we are listing friends?, do not exclude in this case
if(!empty($args))
return $qs;if(!empty($args))
$args=$args.’,’.$excluded_user;
else
$args=$excluded_user;$qs=build_query($args);
return $qs;
}’
You must be logged in to reply to this topic.