diff options
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/app.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/user.php | 119 |
2 files changed, 2 insertions, 119 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 463e13da915..9f6932b3a89 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -1244,7 +1244,7 @@ class OC_App { $dependencyAnalyzer = new DependencyAnalyzer(new Platform($config), $l); $missing = $dependencyAnalyzer->analyze($info); if (!empty($missing)) { - $missingMsg = join(PHP_EOL, $missing); + $missingMsg = implode(PHP_EOL, $missing); throw new \Exception( $l->t('App "%s" cannot be installed because the following dependencies are not fulfilled: %s', [$info['name'], $missingMsg] diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index 7e7cbab3bce..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 @@ -412,57 +387,6 @@ class OC_User { } /** - * Check whether user can change his avatar - * - * @param string $uid The username - * @return bool - * - * Check whether a specified user can change his avatar - */ - public static function canUserChangeAvatar($uid) { - $user = \OC::$server->getUserManager()->get($uid); - if ($user) { - return $user->canChangeAvatar(); - } else { - return false; - } - } - - /** - * Check whether user can change his password - * - * @param string $uid The username - * @return bool - * - * Check whether a specified user can change his password - */ - public static function canUserChangePassword($uid) { - $user = \OC::$server->getUserManager()->get($uid); - if ($user) { - return $user->canChangePassword(); - } else { - return false; - } - } - - /** - * Check whether user can change his display name - * - * @param string $uid The username - * @return bool - * - * Check whether a specified user can change his display name - */ - public static function canUserChangeDisplayName($uid) { - $user = \OC::$server->getUserManager()->get($uid); - if ($user) { - return $user->canChangeDisplayName(); - } else { - return false; - } - } - - /** * Check if the password is correct * * @param string $uid The username @@ -547,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 @@ -586,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 |