regenerate session id on successful login, fixes integration test

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2016-12-01 14:06:22 +01:00
parent 7b3fdfeeaa
commit 50844e8c47
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 4 additions and 0 deletions

View File

@ -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