BuddyDev

Search

[Resolved] Buddyboss – hide admin user id from member directory and network search.

Tagged: 

  • Participant
    Level: Initiated
    Posts: 8
    J on #53269

    Hello,

    Could someone please give me code hide admin user id from member directory and network search. I’ve had a ticket open with Buddyboss going on for days now. For some reason I am unable to add a Profile type to the admin account so that I can hide the profile type.

  • Keymaster
    (BuddyDev Team)
    Posts: 24566
    Brajesh Singh on #53270

    Hi J,
    Welcome to BuddyDev support forums.

    Here is a link that shows exact code for hiding admin users from members directory.

    https://buddydev.com/hiding-users-on-buddypress-based-site/

    I am not sure if that will help you with network search though.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    J on #53271

    Hi Brajesh! Thank you!

    So for the first code am I only changing this:
    array( 1, 2, 3 );

    Here is an expert to jog your memory – “Here is a general example on how to exclude 3 users with IDS 1,2,3 from all the list(yes, It will remove from widgets/friend lists too).”

    And for the second code, I dont see any id placeholders, so can I enter as is?

    Here is an excerpt: “If you want to exclude all users by a specific WordPress roles from listing on your BuddyPress site, that is easy. Here is a code example showing how to exclude all admins from every list on the site.”

  • Keymaster
    (BuddyDev Team)
    Posts: 24566
    Brajesh Singh on #53272

    Hi,
    In the first snippet, you can replace 1,2,3 etc with the actual user ids(example 1, 5, 7,9 etc).

    In the second snippet, I have shown exact code needed to exclude the ‘administrator’ role. That should be good enough for your use case without any modification. You don’t need the first snippet.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    J on #53273

    Brajesh I could hug you! Thank you so much! The second hides from both directory and network search! Do you anticipate having to update the code? How often should I check back or test?

  • Participant
    Level: Initiated
    Posts: 8
    J on #53274

    There is something else I needed help with.

    I would like code to override the below setting so that all members see Administrator posts to the activity feed.

    Relevant Activity
    □ Restrict the Activity Feed directory to only posts that are relevant to the logged-in member While logged in, members will only see activity posts from their own timeline, their connections, members they followed, groups they joined, forum discussions they subscribed to, and posts they are mentioned in.

  • Keymaster
    (BuddyDev Team)
    Posts: 24566
    Brajesh Singh on #53276

    Hi J,
    Thank you for the reply.

    1. The code will work fine with members directory without any issue.
    2. For the network search, I will suggest testing with each BuddyBoss major release.

    About the other issue related to activity, Please contact BuddyBoss. It is a very much BuddyBoss specific behaviour and I believe they should be able to assist you with it better than I can.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    J on #53293

    Thank you Brajesh. Do you know how Facebook has a data retention policy where they keep data for 3 months after a user deletes account? How can I do this? I checked with host and they said there is a setting in Buddyboss. Then, buddyboss said there isnt.

  • Keymaster
    (BuddyDev Team)
    Posts: 24566
    Brajesh Singh on #53296

    Hi J,
    Thank you for the understanding.

    At the moment, I am not seeing any such option for BuddyBoss or BuddyPress.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    J on #53327

    Hey Brajesh! Currently, there is no option for a user to edit and delete their own comment in the discussion forum. People sometimes regret posting a comment. I don’t want them to email me asking me to delete their reply. Is there an append code I can add to the Theme to give them at least the delete option?

The topic ‘ [Resolved] Buddyboss – hide admin user id from member directory and network search.’ is closed to new replies.

This topic is: resolved