We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf7afcd + 1177c70 commit 83c64f3Copy full SHA for 83c64f3
1 file changed
apps/user_ldap/lib/User_LDAP.php
@@ -395,8 +395,14 @@ public function getDisplayName($uid) {
395
}
396
397
$user = $this->access->userManager->get($uid);
398
- $displayName = $user->composeAndStoreDisplayName($displayName, $displayName2);
399
- $this->access->connection->writeToCache($cacheKey, $displayName);
+ if ($user instanceof User) {
+ $displayName = $user->composeAndStoreDisplayName($displayName, $displayName2);
400
+ $this->access->connection->writeToCache($cacheKey, $displayName);
401
+ }
402
+ if ($user instanceof OfflineUser) {
403
+ /** @var OfflineUser $user*/
404
+ $displayName = $user->getDisplayName();
405
406
return $displayName;
407
408
0 commit comments