Merge pull request #590 from nextcloud/fixing-undefined-OfflineUser-composeAndStoreDisplayName

Fix undefined OfflineUser::composeAndStoreDisplayName()
This commit is contained in:
Morris Jobke 2016-07-28 17:41:02 +02:00 committed by GitHub
commit 83c64f3485
1 changed files with 8 additions and 2 deletions

View File

@ -395,8 +395,14 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
}
$user = $this->access->userManager->get($uid);
if ($user instanceof User) {
$displayName = $user->composeAndStoreDisplayName($displayName, $displayName2);
$this->access->connection->writeToCache($cacheKey, $displayName);
}
if ($user instanceof OfflineUser) {
/** @var OfflineUser $user*/
$displayName = $user->getDisplayName();
}
return $displayName;
}