From 3445c062ecf188134c3ef236aa911a074ff29cff Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Mon, 24 Mar 2014 15:05:14 +0000 Subject: [PATCH] Use loginname instead of display name getDisplayName would return the display name of the user, not great if it is a canonical string. The uid passed back from 'login' is the UUID of the user, so also not suitable. The login name from the session is the username the user used to log in to ownCloud in the first place, which is what is needed. --- apps/files_external/lib/smb_auto.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/smb_auto.php b/apps/files_external/lib/smb_auto.php index 52fceea64f..f2ebdca9cd 100644 --- a/apps/files_external/lib/smb_auto.php +++ b/apps/files_external/lib/smb_auto.php @@ -15,7 +15,7 @@ class SMB_Auto extends \OC\Files\Storage\SMB{ $username_as_share = ($params['username_as_share'] === 'true'); $params_auth = \OC::$session->get('smb-credentials'); - $user = \OC_User::getDisplayName($params_auth['uid']); + $user = \OC::$session->get('loginname'); $password = $params_auth['password']; $root=isset($params['root'])?$params['root']:'/';