diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-07 15:39:34 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 09:31:22 +0200 |
commit | 9c9fec36dd469494738b57c691338cbe71926c10 (patch) | |
tree | d02f7bfec8ced060c1df1740e1dfadb3b7f10a37 /lib/private/legacy/user.php | |
parent | a323111bd1285f74aa405c240be86b5de5d0c502 (diff) | |
download | nextcloud-server-9c9fec36dd469494738b57c691338cbe71926c10.tar.gz nextcloud-server-9c9fec36dd469494738b57c691338cbe71926c10.zip |
Add occ commands to enable and disable a user + a disabled user can no longer login - fixes #23838
Diffstat (limited to 'lib/private/legacy/user.php')
-rw-r--r-- | lib/private/legacy/user.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index 11c35daa0de..34ce68e989f 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/user.php @@ -63,8 +63,6 @@ class OC_User { return OC::$server->getUserSession(); } - private static $_backends = array(); - private static $_usedBackends = array(); private static $_setupedBackends = array(); @@ -105,7 +103,7 @@ class OC_User { break; default: \OCP\Util::writeLog('core', 'Adding default user backend ' . $backend . '.', \OCP\Util::DEBUG); - $className = 'OC_USER_' . strToUpper($backend); + $className = 'OC_USER_' . strtoupper($backend); self::$_usedBackends[$backend] = new $className(); \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); break; @@ -175,6 +173,7 @@ class OC_User { /** * Try to login a user using the magic cookie (remember login) * + * @deprecated use \OCP\IUserSession::loginWithCookie() * @param string $uid The username of the user to log in * @param string $token * @return bool @@ -241,6 +240,8 @@ class OC_User { /** * Sets user id for session and triggers emit + * + * @param string $uid */ public static function setUserId($uid) { $userSession = \OC::$server->getUserSession(); @@ -296,14 +297,11 @@ class OC_User { /** * Check if the user is logged in, considers also the HTTP basic credentials * + * @deprecated use \OC::$server->getUserSession()->isLoggedIn() * @return bool */ public static function isLoggedIn() { - if (\OC::$server->getSession()->get('user_id') !== null && self::$incognitoMode === false) { - return self::userExists(\OC::$server->getSession()->get('user_id')); - } - - return false; + return \OC::$server->getUserSession()->isLoggedIn(); } /** |