diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 05b24c8ccf..dca5ff394a 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -339,6 +339,8 @@ class Session implements IUserSession, Emitter { throw new LoginException($message); } + $this->session->regenerateId(); + $this->setUser($user); $this->setLoginName($loginDetails['loginName']); @@ -560,6 +562,8 @@ class Session implements IUserSession, Emitter { // Ignore and use empty string instead } + $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); + $user = $this->manager->get($uid); if (is_null($user)) { // user does not exist