From 33999303551c11ea4a01d642900fc7213fe6e615 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 22 Oct 2014 13:28:08 +0200 Subject: [PATCH] Backport of #11702 set up FS by username, not login name\! better variable name --- lib/private/user.php | 9 +++++---- 1 file 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; } -- 2.39.5