rename user-id to loginname to stay consistent
This commit is contained in:
parent
22bd69f75c
commit
c3829dfa61
|
@ -544,12 +544,12 @@ class OC {
|
||||||
OC_User::useBackend(new OC_User_Database());
|
OC_User::useBackend(new OC_User_Database());
|
||||||
OC_Group::useBackend(new OC_Group_Database());
|
OC_Group::useBackend(new OC_Group_Database());
|
||||||
|
|
||||||
if (isset($_SERVER['PHP_AUTH_USER']) && self::$session->exists('user_id')
|
if (isset($_SERVER['PHP_AUTH_USER']) && self::$session->exists('loginname')
|
||||||
&& $_SERVER['PHP_AUTH_USER'] !== self::$session->get('loginname')) {
|
&& $_SERVER['PHP_AUTH_USER'] !== self::$session->get('loginname')) {
|
||||||
$sessionUser = self::$session->get('loginname');
|
$sessionUser = self::$session->get('loginname');
|
||||||
$serverUser = $_SERVER['PHP_AUTH_USER'];
|
$serverUser = $_SERVER['PHP_AUTH_USER'];
|
||||||
OC_Log::write('core',
|
OC_Log::write('core',
|
||||||
"Session user-id ($sessionUser) doesn't match SERVER[PHP_AUTH_USER] ($serverUser).",
|
"Session loginname ($sessionUser) doesn't match SERVER[PHP_AUTH_USER] ($serverUser).",
|
||||||
OC_Log::WARN);
|
OC_Log::WARN);
|
||||||
OC_User::logout();
|
OC_User::logout();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue