← Back to team overview

phpdevshell team mailing list archive

[Bug 1118717] [NEW] userActions->userUpdate() and userActions->userAdd() gets called too early

 

Public bug reported:

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.

** Affects: phpdevshell
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of
PHPDevShell, which is subscribed to PHPDevShell.
https://bugs.launchpad.net/bugs/1118717

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

Status in Open Source PHP RAD Framework with UI.:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/phpdevshell/+bug/1118717/+subscriptions


Follow ups

References