Would it be possible to extend this module to hide the administrator user (uid 1) completely from a site?
- Who's online block
- Who's new block
- Have /admin/user/user not make any reference of user or role "administrator" (I have defined another role which will be able to create new users using the "administerusersbyrole and role_delegation modules, this role can access the admin/user/user page where a filter can be chosen based on "administrator" role).
- /user/1 should redirect to "access denied page" not the current user's details (/user)
I have seen several solutions on doing this by altering core files, but it would be nice if one module could do this cleanly.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | userone.module.patch | 714 bytes | danreb |
| #6 | userone.module.patch | 724 bytes | danreb |
Comments
Comment #1
mrgoltra commentedsubscribing.
Looking for a way to hid user1 from the system without hacking core.
Comment #2
Elder Brother commented+1, would be great to have user1 completely removed from user list.
Comment #3
ki commentedAdded code to provide its own version of "Who's new" and "Who's online" blocks. The code is identical to user module's except that it hides user one.
Denying access to user one's profile (/user/1) is already implemented.
Comment #5
Anonymous (not verified) commentedIn the user list website/admin/user/user user1 is stil on the list, viewing and editing (selectors in the setting of user one) is not possible: thats ok!
It would be nice to have a 3th selector 'remove (hide ) user 1 out of the userlist'.
Comment #6
danreb commentedHere's a patch that removed user 1 from the list of users in admin/user/user
Comment #7
danreb commentedhere's another one, I've just cleanse the comment describing the patch.
Comment #8
danreb commentedhiding user 1 in
example.com/profilecan be achieved via the theme, don't know how to do this in module, take a look here -> http://drupal.org/node/1002052Comment #9
ki commenteddanreb's patch #7 has been pushed to version 1.1.
Thanks.