Fix undefined OfflineUser::composeAndStoreDisplayName() - fixes #23248 (#25598)

This commit is contained in:
Thomas Müller 2016-07-26 22:36:47 +02:00 committed by Bjoern Schiessle
parent 900267333e
commit c35b4f12ff
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 8 additions and 2 deletions

View File

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