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:
parent
ba63e46b5e
commit
3445c062ec
|
@ -15,7 +15,7 @@ class SMB_Auto extends \OC\Files\Storage\SMB{
|
||||||
$username_as_share = ($params['username_as_share'] === 'true');
|
$username_as_share = ($params['username_as_share'] === 'true');
|
||||||
|
|
||||||
$params_auth = \OC::$session->get('smb-credentials');
|
$params_auth = \OC::$session->get('smb-credentials');
|
||||||
$user = \OC_User::getDisplayName($params_auth['uid']);
|
$user = \OC::$session->get('loginname');
|
||||||
$password = $params_auth['password'];
|
$password = $params_auth['password'];
|
||||||
|
|
||||||
$root=isset($params['root'])?$params['root']:'/';
|
$root=isset($params['root'])?$params['root']:'/';
|
||||||
|
|
Loading…
Reference in New Issue