Hide superadmin user

I'd like to hide the superadmin user from appearing in any members lists or being viewable by any user.

e.g. in buddypress the user that holds superadmin rights is listed as part of the members list, and even with a "stealth name" (i.e. not giving the superadmin user the id: superadmin, I still want to hide the superadmin user, irrespective of the id.

Is there a plugin for this? How could this be achieved?

  • drmike
    • DEV MAN’s Mascot

    Maybe I;m just not seeing it but we just don;t use the admin user and remove it from the superadmin list. I'd have to go find the thread but I know we talked about, after upgrading your own account to that level, either downgrading the admin to be a subscriber on the first blog. We talked about deleting it all together (We do that on most of our platforms) but with wordpress, trying to log in with a missing user account shows a "Not a user" error which tells hackers to stop trying with that username and move on.

  • Chris
    • Flash Drive

    I don't want to remove the user.

    Someone has to have a superadmin level account, don't they?

    I just want to stop that user (whatever the username) from appearing in any lists... in any ideal world I'd like something that would hide 'admin' or 'superadmin' usernames, be it buddypress or a multisite.


  • drmike
    • DEV MAN’s Mascot

    Someone has to have a superadmin level account, don't they?

    Yes, that's why I was noting to make sure that you give it to someone else.

    Each script that you;re using to make these lists is setup differently. I know with the bp_group_has_members function we discussed earlier today, it has an option to exclude admin members.

    That's not something coded in normally.

    What you could do is, before outputting any code is do a check against is_super_admin. If true, then skip over displaying the username. If false, then their a normal user and display.

    is_super_admin only works with user IDs though. If you;re running through a list, you should have access to those though.

    Does that helps?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.