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.
This commit is contained in:
Robin McCorkell 2014-03-24 15:05:14 +00:00
parent ba63e46b5e
commit 3445c062ec
1 changed files with 1 additions and 1 deletions

View File

@ -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']:'/';