use wcf\system\cache\builder\UserGroupOptionCacheBuilder;
use wcf\system\cache\builder\UserGroupPermissionCacheBuilder;
use wcf\system\database\DatabaseException;
+use wcf\system\event\EventHandler;
use wcf\system\exception\PermissionDeniedException;
use wcf\system\request\RequestHandler;
use wcf\system\user\authentication\UserAuthenticationFactory;
* @return boolean
*/
public function changeUser(User $user, $hideSession = false) {
+ $eventParameters = array('user' => $user, 'hideSession' => $hideSession);
+
+ EventHandler::getInstance()->fireAction($this, 'beforeChangeUser', $eventParameters);
+
+ $user = $eventParameters['user'];
+ $hideSession = $eventParameters['hideSession'];
+
if ($this->supportsVirtualSessions) {
return $this->changeUserVirtual($user);
}
$this->languageID = $this->user->languageID;
$this->styleID = $this->user->styleID;
+ EventHandler::getInstance()->fireAction($this, 'afterChangeUser');
+
return true;
}
$this->languageID = $this->user->languageID;
$this->styleID = $this->user->styleID;
+ EventHandler::getInstance()->fireAction($this, 'afterChangeUser');
+
return false;
}