Active
Project:
Subuser
Version:
6.x-1.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2012 at 20:24 UTC
Updated:
18 Sep 2012 at 20:24 UTC
Was trying to get Rules to take action on the event "Subuser was created" and couldn't figure out why a condition I had to check for the Parent user's role wasn't working. Looks like it's because the global $user isn't loaded in the function subuser_create_form_submit in subuser.pages.inc. The "patch" below fixed it for me. Let me know if I should post an actual patch and I can try to get back on here and do so when I have a second.
/**
* Modified copy of user_register_submit().
*
* Just changed permission line, and removed uid == 1 case, which should never
* occur.
*/
function subuser_create_form_submit($form, &$form_state) {
+ global $user;
global $base_url;
The line to add it at is 269 in version 6.x-1.8.