Remove setUidAsDisplayName

This code is a leftover from the old Shibboleth implementation from ownCloud days, nowadays it causes more issues than it does good (such as https://github.com/nextcloud/user_saml/pull/137). Let's remove it for the future thus.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-07-31 15:52:53 +02:00
parent 98b664a000
commit bef4f015ee
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 0 additions and 12 deletions

View File

@ -173,18 +173,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();