Skip to content

Commit

Permalink
[stable9.1] Fix undefined OfflineUser::composeAndStoreDisplayName() - f…
Browse files Browse the repository at this point in the history
…ixes #23248 (#25601)
  • Loading branch information
DeepDiver1975 authored Aug 3, 2016
1 parent 66f86bc commit 1a497b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/user_ldap/lib/User_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,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 1a497b1

Please sign in to comment.