diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-04-27 12:01:13 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-11 13:36:46 +0200 |
commit | 7aa16e1559e8ef1121ac2529090a6881b4d919d5 (patch) | |
tree | 3967b0038d51acc71c7e41b44fd1008c004f7fa5 /lib/private/legacy/user.php | |
parent | 18704a9fc879b13322d6ddc6f8e0ef331415a5c3 (diff) | |
download | nextcloud-server-7aa16e1559e8ef1121ac2529090a6881b4d919d5.tar.gz nextcloud-server-7aa16e1559e8ef1121ac2529090a6881b4d919d5.zip |
fix setup
Diffstat (limited to 'lib/private/legacy/user.php')
-rw-r--r-- | lib/private/legacy/user.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index ca408d347bd..499e916994a 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/user.php @@ -149,39 +149,7 @@ class OC_User { } /** - * Try to login a user - * - * @param string $loginName The login name of the user to log in - * @param string $password The password of the user - * @return boolean|null - * - * Log in a user and regenerate a new session - if the password is ok - * - * @deprecated Use \OCP\IUserSession::login - */ - public static function login($loginName, $password) { - $result = self::getUserSession()->login($loginName, $password); - if (!$result) { - $users = \OC::$server->getUserManager()->getByEmail($loginName); - // we only allow login by email if unique - if (count($users) === 1) { - $result = self::getUserSession()->login($users[0]->getUID(), $password); - } - } - if ($result) { - // Refresh the token - \OC::$server->getCsrfTokenManager()->refreshToken(); - //we need to pass the user name, which may differ from login name - $user = self::getUserSession()->getUser()->getUID(); - OC_Util::setupFS($user); - //trigger creation of user home and /files folder - \OC::$server->getUserFolder($user); - } - return $result; - } - - /** * Try to login a user using the magic cookie (remember login) * * @deprecated use \OCP\IUserSession::loginWithCookie() |