Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When I try to block Administrator account by selecting it in the checklist of users and by applying block all selected accounts, it gives a warning that the administrator account cannot be blocked, but it actually did block the administrator account.
Drupal 7.15 used, fresh install with Role Assign module also installed.
Proposed resolution
- When user is not given the right to administer a user don't allow it to be checked in the list.
- Allow th right to hide a user from the list (Administrator)
- Allow the module to work without the 'administer users' permission
Comments
Comment #1
ilgriso CreditAttribution: ilgriso commentedI also found very soon this bug, I dont have the Role Assign module installed.
Edit: very similar to: http://drupal.org/node/1670954 (with patch, not working for me)
Comment #2
balleyne CreditAttribution: balleyne commentedAs mentioned in the other report, I think that's because hook_user_update() was used -- which is called after the update has already taken place -- in line 160 of the latest beta, when probably hook_user_presave() should be used instead, so that the permission check gets called pre- rather than post-update.
Comment #3
gaele CreditAttribution: gaele commented#1717876: Remove dependency on 'Administer users' permission
Comment #4
gaele CreditAttribution: gaele commentedThis is the right one: #1670954: User who doesn't have edit permission can block/unblock any user