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.

CommentFileSizeAuthor
#7 userone.module.patch714 bytesdanreb
#6 userone.module.patch724 bytesdanreb

Comments

mrgoltra’s picture

subscribing.

Looking for a way to hid user1 from the system without hacking core.

Elder Brother’s picture

+1, would be great to have user1 completely removed from user list.

ki’s picture

Status: Active » Fixed

Added 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0
Status: Closed (fixed) » Active

In 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'.

danreb’s picture

StatusFileSize
new724 bytes

Here's a patch that removed user 1 from the list of users in admin/user/user

danreb’s picture

StatusFileSize
new714 bytes

here's another one, I've just cleanse the comment describing the patch.

danreb’s picture

hiding user 1 in example.com/profile can be achieved via the theme, don't know how to do this in module, take a look here -> http://drupal.org/node/1002052

ki’s picture

Status: Active » Fixed

danreb's patch #7 has been pushed to version 1.1.

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.