diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-10-22 13:28:08 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-10-22 17:58:09 +0200 |
commit | 33999303551c11ea4a01d642900fc7213fe6e615 (patch) | |
tree | b72be8267df1f35c0b263aed4380972b37b3b608 /lib | |
parent | 09d80ac9fc723793ee6e81defe5bd667b4e009a4 (diff) | |
download | nextcloud-server-33999303551c11ea4a01d642900fc7213fe6e615.tar.gz nextcloud-server-33999303551c11ea4a01d642900fc7213fe6e615.zip |
Backport of #11702
set up FS by username, not login name\!
better variable name
Diffstat (limited to 'lib')
-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 fe65605bf78..b8e3ad20313 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; } |