aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-07-24 14:39:18 +0200
committerGitHub <noreply@github.com>2017-07-24 14:39:18 +0200
commitc43d479372c408543f7583aa7682c14dec0857f9 (patch)
treed271a1e8930a087a7a54bb179ea7c28b6e0b2a95 /lib
parent184f25c0d6202ccbca1c828e1f0cb287a864a790 (diff)
parent188b87e03b9d6aaf4c9591c4a17f0f2685302999 (diff)
downloadnextcloud-server-c43d479372c408543f7583aa7682c14dec0857f9.tar.gz
nextcloud-server-c43d479372c408543f7583aa7682c14dec0857f9.zip
Merge pull request #5855 from nextcloud/cleanup-legacy-user-class
Cleanup legacy user class from unused methods
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/user.php68
1 files changed, 1 insertions, 67 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index 161942c995c..2b0fba73366 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -156,20 +156,6 @@ 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
- * @param string $oldSessionId
- * @return bool
- */
- public static function loginWithCookie($uid, $token, $oldSessionId) {
- return self::getUserSession()->loginWithCookie($uid, $token, $oldSessionId);
- }
-
- /**
* Try to login a user, assuming authentication
* has already happened (e.g. via Single Sign On).
*
@@ -233,7 +219,7 @@ class OC_User {
//setup extra user backends
self::setupBackends();
- self::unsetMagicInCookie();
+ self::getUserSession()->unsetMagicInCookie();
return self::loginWithApache($backend);
}
@@ -382,17 +368,6 @@ class OC_User {
}
/**
- * Autogenerate a password
- *
- * @return string
- *
- * generates a password
- */
- public static function generatePassword() {
- return \OC::$server->getSecureRandom()->generate(30);
- }
-
- /**
* Set password
*
* @param string $uid The username
@@ -496,30 +471,6 @@ class OC_User {
}
/**
- * disables a user
- *
- * @param string $uid the user to disable
- */
- public static function disableUser($uid) {
- $user = \OC::$server->getUserManager()->get($uid);
- if ($user) {
- $user->setEnabled(false);
- }
- }
-
- /**
- * enable a user
- *
- * @param string $uid
- */
- public static function enableUser($uid) {
- $user = \OC::$server->getUserManager()->get($uid);
- if ($user) {
- $user->setEnabled(true);
- }
- }
-
- /**
* checks if a user is enabled
*
* @param string $uid
@@ -535,23 +486,6 @@ class OC_User {
}
/**
- * Set cookie value to use in next page load
- *
- * @param string $username username to be set
- * @param string $token
- */
- public static function setMagicInCookie($username, $token) {
- self::getUserSession()->setMagicInCookie($username, $token);
- }
-
- /**
- * Remove cookie for "remember username"
- */
- public static function unsetMagicInCookie() {
- self::getUserSession()->unsetMagicInCookie();
- }
-
- /**
* Returns the first active backend from self::$_usedBackends.
*
* @return OCP\Authentication\IApacheBackend|null if no backend active, otherwise OCP\Authentication\IApacheBackend