hiding admin

i have been searching in the archives to see if anyone has come up with a way to hide the admin account from the general population.  I really dont see any benefit to having the admin account listing on member lists and home page areas. would rather set it to private or just keep it from displaying the link or icon on the members list. 

  • Durangod, I actually agree with you. I have thought for a long time that the admin account should be more of a stealth account, not findable, not trackable, just a stealth user that can see all and deal with all.

  • I also agree. I did some changes for hiding admins in the lists and the river of our site.

    For hiding them in the list, I added a condition in /mod/profile/views/default/profile/listing.php

    if (isadminloggedin() || !$vars['entity']->admin ) {
        // previous code

    For the river, I added a condition in the add_to_river() funtion before 'return insert_data(...'

    if ($subject->admin) {
        return true;   

    I know modifying the engine is not a good idea, but I think this change is necessary. Maybe some engine functionality should be implemented as objects, so functions could be overridable whitout touching the original code.

    Not sure if I did other changes for hiding admins, I guess not.

  • Maybe a plugin could be made, hideAdmin ?  :-)  Good work, morgar!

  • I just edited the code for adding a missing "!" in the first snippet :)

    Yes, it might be converted to a plugin, I will add it to my list  :)

  • I think a lot of people would like it, morgar!  :-)

  • morgar, thanks, but are you sure thats all you did for the list part of it, i have played with that and admin still being listed.. i even totally removed the admin config process of that page and set admin info string to null and still listed.   any suggestions lol  or should i just wait for the plugin, i dont mind..

  • @Durangod Did you test with a 'normal' user? Because admins will be visible if you are logged as admin.

  • yeah im not logged in at all right now as anyone, im just pulling up the index as anyone would and admin still there on the latest members list..

  • @Yakiv Hiding admins in the list would be possible with a plugin, but not hiding them in the river because it's a change in the engine. I will suggest that change in the trac.

  • i dont use river so that works for me mogar, ill wait for the plugin if and when it comes around, i think that might be better in the long run... i hope you put that on your list lol thanks so much..