diff options
author | blizzz <blizzz@owncloud.com> | 2014-10-22 17:56:30 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2014-10-22 17:56:30 +0200 |
commit | 44a7a3690a161317daea756a37219093b96f020e (patch) | |
tree | 8c27c86e2e1dd1406f4dbbb608ff081907399130 | |
parent | 37043508a48b3dccede2217582031019aabe3442 (diff) | |
parent | 993376fb6f62772554e0f35b04f52468021a6cab (diff) | |
download | nextcloud-server-44a7a3690a161317daea756a37219093b96f020e.tar.gz nextcloud-server-44a7a3690a161317daea756a37219093b96f020e.zip |
Merge pull request #11702 from owncloud/fix-11637
setup filesystem by username, not login name, fixes #11637
-rw-r--r-- | lib/private/user.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index 641a329b0dd..3c23c19b015 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -224,17 +224,18 @@ class OC_User { /** * Try to login a user - * @param string $uid The username of the user to log in + * @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 */ - public static function login($uid, $password) { + public static function login($loginname, $password) { session_regenerate_id(true); - $result = self::getUserSession()->login($uid, $password); + $result = self::getUserSession()->login($loginname, $password); if ($result) { - OC_Util::setupFS($uid); + //we need to pass the user name, which may differ from login name + OC_Util::setupFS(self::getUserSession()->getUser()->getUID()); } return $result; } |