Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide Admin

  • @scotm

    Participant

    Is there an obvious way to hide the Admin user from Buddypress (members, etc.)?

Viewing 25 replies - 1 through 25 (of 34 total)
  • @djpaul

    Keymaster

    I’ve renamed my admin account to get around this. However, i’d like to get a way of hiding the bbpress forum user account for the user listing on the home page. Andy could we get a filter added in for this?

    @ceo

    Participant

    Bumping this because I’m curious about the same thing DJPaul mentioned. The need to create a random account for bbPress is fine, but it’s pointless having it listed with the BuddyPress members when it’s not really one.

    Any suggestions?

    @johnjamesjacoby

    Keymaster

    There’s something like this in the works, but it won’t be available for a few months yet. :)

    @johnegg

    Participant

    Any update on this?

    @intimez

    Participant

    I noticed this topic is marked as resolved. How can I enable this?

    @scotm

    Participant

    Still curious about this one. Can we hide the Admin throughout BuddyPress activity sitewide?

    @symm2112

    Participant

    I’m not sure if it hides activity, but I heard a trick to “hiding” admins from the member list was to change their status in the database of the user to “99” and that prevents it from showing in the member’s list.

    @djpaul

    Keymaster

    @scotm what are you doing on your BP site with the admin user to generate activity which you don’t want in the activity stream?

    @nuprn1 did you do a plugin to hide the admin account from the members directory, or was that someone else?

    @scotm

    Participant

    @DJPaul Any activity that the Admin carries out in my opinion should be hidden. Starting a Group, a forum topic, etc. In my case I am creating a number of groups for members to join and I’d like to hide all of that activity.

    @r-a-y

    Keymaster

    @DJPaul @scotm – I believe @sbrajesh did a plugin to hide admin stuff… let me see if I can find it:

    Stealth Mode for BuddyPress Site Admin Plugin

    @scotm

    Participant

    Saw that one…premium.

    @r-a-y

    Keymaster

    @scotm – if you read the end of that post, there’s a free solution noted by Brajesh.

    @scotm

    Participant

    Tried it, errors.

    @r-a-y

    Keymaster

    The snippet only works on WPMU.

    If you’re using standard WP, replace is_site_admin() with if(current_user_can(‘manage_options’)) (thanks Brajesh).

    Also, you could try adding the function in your theme’s functions.php (omit the add_action line).

    @sbrajesh

    Participant

    hi @r-a-y is_site_admin() and is_admin() are very different. is_admin() checks whether you are inside wordpress admin or not.
    @scotm
    How about making the activity of admin user private
    `add_filter(“bp_activity_hide_sitewide_before_save”,”make_admin_activity_private”,10,2);
    function make_admin_activity_private($hide_sitewide,$activity){
    //get the current activity
    if(current_user_can(‘manage_options’))//user is admin
    return 1;
    else
    return $hide_sitewide;

    }
    `
    Hopefully the code goes through this forum.

    @r-a-y

    Keymaster

    Hey @sbrajesh, you’re right! Sorry about that! Was thinking off the top ;)

    @djpaul

    Keymaster

    BP 1.2.3 does provide is_site_admin() in the compat file, FWIW.

    @scotm

    Participant

    @sbrajesh I’m going to try that…Thanks

    @r-a-y

    Keymaster

    Yes, you’re right Paul!

    @sbrajesh

    Participant

    hey @r-a-y :) no prob.
    @scotm looking forward to hear if it works or not.

    @scotm

    Participant

    @sbrajesh

    No luck with that code to hide Admin activity. Can you pastebin to make sure I have it clean?

    @scotm

    Participant

    Just caught wind of this plugin to hide admin activity: https://wordpress.org/extend/plugins/bp-ninja/

    @codeispoetry

    Participant

    Socialpreneur has a nice snippet here that makes it easy to hide the admin from the members list assuming you know the admin’s login name.

    Place this in your bp-custom.php:


    function my_bp_member_user_login() {
    echo my_bp_get_member_user_login();
    }
    function my_bp_get_member_user_login() {
    global $members_template;
    return apply_filters( 'my_bp_get_member_user_login', $members_template->member->user_login );
    }

    Then in your members-loop.php file, place this just below the while statement (wrapped in php tags!):
    if ( my_bp_get_member_user_login() == 'admin' ) continue ;

    (Supposing your admin’s login is ‘admin’.)

    @scotm

    Participant

    Has anyone come up with a clean solution to this one yet? Looking to hide all Admin activity on a BP install.

    Thx

    @bpinspire

    Participant

    Any new update on this one?

Viewing 25 replies - 1 through 25 (of 34 total)
  • The topic ‘Hide Admin’ is closed to new replies.
Skip to toolbar