userActions->userUpdate() and userActions->userAdd() gets called too early

Bug #1118717 reported by Smokey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
New
High
Greg

Bug Description

Above mentioned methods get called after the user has been added/modified, but before the extra roles and extra groups are saved.

To quickly test, add the following code to userActions->userUpdate() in /plugins/userActions/includes/userActions.class.php:

 $userId=$userArray->user_id;
 $this->db->cacheClear("roles_{$userId}");
 $this->db->cacheClear("groups_{$userId}");
 $user = $this->user;
 $userGroups = $user->getGroups($userArray->user_id);
 $userRoles = $user->getRoles($userArray->user_id);
 $this->debug->log("groups: ". $userGroups);
 $this->debug->log("roles: " . $userRoles);

Now modify the extra groups or roles of a user.

Revision history for this message
Greg (gregfr) wrote :

Thanks a lot for your contribution. It seems a deep review of this part of the code is needed. In fact, we plan to re-write the inner working of authentication process. It will probably take a few weeks to have a new one working, hopefully ready for version 4.0. If it fits your planning, we'd be happy to collaborate with you on this.

greg

Changed in phpdevshell:
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → Greg (gregfr)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.