Skip to content

Commit

Permalink
Fix undefined OfflineUser::composeAndStoreDisplayName() - fixes #23248 (
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored and schiessle committed Jul 27, 2016
1 parent 9002673 commit c35b4f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/user_ldap/user_ldap.php
Expand Up @@ -385,8 +385,14 @@ public function getDisplayName($uid) {
}

$user = $this->access->userManager->get($uid);
$displayName = $user->composeAndStoreDisplayName($displayName, $displayName2);
$this->access->connection->writeToCache($cacheKey, $displayName);
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;
}

Expand Down

0 comments on commit c35b4f1

Please sign in to comment.