Closed (fixed)
Project:
Auto Assign Role
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2009 at 03:34 UTC
Updated:
1 Aug 2009 at 13:10 UTC
When the role is assigned, the value of the role in the $user object is supposed to be the role name, not the role ID. But roles assigned by autoassignrole are in the form
$user->roles[4] = 4
instead of the correct (assuming the 'kid' role is number 4):
$user->roles[4] = 'kid';
This often works, but is not correct.
The attached patch changes autoassignrole to use the role name as the value in the roles array.
| Comment | File | Size | Author |
|---|---|---|---|
| autoassignrole_role_name_01.patch | 1.11 KB | rfay |
Comments
Comment #1
rfayThis may not be worth spending much time on, as when the $user is later loaded, Drupal puts it together correctly. The only time this (small) flaw affects things in during the user_save() process. It might as well be fixed, but it won't have wide effects, I don't think.
Comment #2
cyberswat commentedhttp://drupal.org/cvs?commit=239212