[Pkg-owncloud-commits] [owncloud] 39/46: Backport of #11702

David Prévot taffit at moszumanska.debian.org
Fri Oct 24 15:11:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 33999303551c11ea4a01d642900fc7213fe6e615
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Wed Oct 22 13:28:08 2014 +0200

    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 fe65605..b8e3ad2 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;
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list