Repeated calls to loginWithApache() should not not try to set user information in the session again

This commit is contained in:
Thomas Müller 2015-08-21 17:31:58 +02:00
parent 6006a03ef1
commit 0f2865abb2
1 changed files with 6 additions and 4 deletions

View File

@ -277,11 +277,13 @@ class OC_User {
OC_Hook::emit("OC_User", "pre_login", array("run" => &$run, "uid" => $uid));
if ($uid) {
self::setUserId($uid);
self::setDisplayName($uid);
self::getUserSession()->setLoginName($uid);
if (self::getUser() !== $uid) {
self::setUserId($uid);
self::setDisplayName($uid);
self::getUserSession()->setLoginName($uid);
OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
}
return true;
}
return false;