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

David Lesieur - December 31, 2009 - 05:14
Status:active» needs work

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

 
 

Drupal is a registered trademark of Dries Buytaert.