-
Author
-
March 3, 2014 at 04:32 #11763robfudge@hotmail.comParticipant
Hi again,
How can I exclude a user from the members list? I have done this with the admin code included.
In this line I have included the user ID to exclude but it keeps getting glister in the Quick profile navigation
$excluded_user=’1,120′;//comma separated ids of users whom you want to excludeadd_action(‘bp_init’, ‘kleo_private_admin’);
function kleo_private_admin(){
global $bp;
if(is_super_admin())
{
remove_action(“wp_head”,”bp_core_record_activity”); //id SM is on, remove the record activity hook
//then remove the last activity, if present
delete_user_meta($bp->loggedin_user->id, ‘last_activity’);
}}
add_action(‘bp_ajax_querystring’,’kleo_exclude_users’,20,2);
function kleo_exclude_users($qs=false,$object=false)
{
//list of users to exclude
$excluded_user=’1,102′;//comma separated ids of users whom you want to excludeif($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[‘user_id’]))
return $qs;if(!empty($args[‘exclude’]))
$args[‘exclude’]=$args[‘exclude’].’,’.$excluded_user;
else
$args[‘exclude’]=$excluded_user;$qs=build_query($args);
return $qs;
}March 6, 2014 at 00:34 #12020AbeKeymasterMaybe that user is friend with you and that is why it is not hiding
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 8, 2014 at 01:00 #12307AbeKeymasterCan’t say. Try just with the new admin and try testing being logged out
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.