Role_delegation and role_limits
nlahm - September 7, 2009 - 13:35
| Project: | Role Delegation |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Description
When I activate the module role_delegation, the module role_limits doesn't work.
It's because role_limits controls the number of users when "activate" is a parameter of the hook_user.
So, all is working if I replace the code :
/**
* Implementation of hook_user().
*/
function role_delegation_user($op, &$edit, &$account, $category = NULL) {
if ($op != 'insert' && $op != 'submit' ) {
return;
} with:
/**
* Implementation of hook_user().
*/
function role_delegation_user($op, &$edit, &$account, $category = NULL) {
if ($op != 'insert' && $op != 'submit' && $op != 'validate') {
return;
} 
#1
This breaks Role Delegation because checks in user_profile_form_validate() prevent hook_user() implementations from adding the 'roles' key to $edit during validation if the user does not have the permission to 'administer permissions'.