summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/user.php
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 15:22:41 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 15:22:41 +0200
commit4b2544925f7f51d7e5cb1329166451f4fbd9e6bf (patch)
treece9a58e2532ec0301dc7e0c266f8256eb79826f9 /lib/private/legacy/user.php
parentdf2eb96cc40893f60a1b63abbe585c448e0a6d9f (diff)
parent661ab1a8c51ec251c44f76c7d58484ff14003336 (diff)
downloadnextcloud-server-4b2544925f7f51d7e5cb1329166451f4fbd9e6bf.tar.gz
nextcloud-server-4b2544925f7f51d7e5cb1329166451f4fbd9e6bf.zip
Merge pull request #23844 from owncloud/disable-user
Add occ commands to enable and disable a user + a disabled user can n…
Diffstat (limited to 'lib/private/legacy/user.php')
-rw-r--r--lib/private/legacy/user.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index 78eb4bab126..18a4c369d5e 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;
@@ -183,6 +181,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
@@ -249,6 +248,8 @@ class OC_User {
/**
* Sets user id for session and triggers emit
+ *
+ * @param string $uid
*/
public static function setUserId($uid) {
$userSession = \OC::$server->getUserSession();
@@ -304,14 +305,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();
}
/**