Merge pull request #18481 from owncloud/fix-apache-login-master

Repeated calls to loginWithApache() should not not try to set user in…
This commit is contained in:
Thomas Müller 2015-09-21 16:09:33 +02:00
commit fd6b4de2d4
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;