diff options
Diffstat (limited to 'lib/private/user.php')
-rw-r--r-- | lib/private/user.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index cdef4d8fe65..c9b1522f85a 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -300,7 +300,7 @@ class OC_User { * Sets user id for session and triggers emit */ public static function setUserId($uid) { - OC::$session->set('user_id', $uid); + \OC::$server->getSession()->set('user_id', $uid); } /** @@ -337,8 +337,8 @@ class OC_User { * Checks if the user is logged in */ public static function isLoggedIn() { - if (\OC::$session->get('user_id') !== null && self::$incognitoMode === false) { - return self::userExists(\OC::$session->get('user_id')); + if (\OC::$server->getSession()->get('user_id') !== null && self::$incognitoMode === false) { + return self::userExists(\OC::$server->getSession()->get('user_id')); } return false; } @@ -386,7 +386,7 @@ class OC_User { * @return string uid or false */ public static function getUser() { - $uid = OC::$session ? OC::$session->get('user_id') : null; + $uid = \OC::$server->getSession() ? \OC::$server->getSession()->get('user_id') : null; if (!is_null($uid) && self::$incognitoMode === false) { return $uid; } else { |