Merge pull request #5939 from nextcloud/dont-have-set-uid-as-displayname

Remove setUidAsDisplayName
This commit is contained in:
Morris Jobke 2017-08-01 13:28:27 +02:00 committed by GitHub
commit 050fa63380

View file

@ -175,18 +175,6 @@ class OC_User {
if ($uid) {
if (self::getUser() !== $uid) {
self::setUserId($uid);
$setUidAsDisplayName = true;
if($backend instanceof \OCP\UserInterface
&& $backend->implementsActions(\OC\User\Backend::GET_DISPLAYNAME)) {
$backendDisplayName = $backend->getDisplayName($uid);
if(is_string($backendDisplayName) && trim($backendDisplayName) !== '') {
$setUidAsDisplayName = false;
}
}
if($setUidAsDisplayName) {
self::setDisplayName($uid);
}
$userSession = self::getUserSession();
$userSession->setLoginName($uid);
$request = OC::$server->getRequest();