[stable9.1] Fix undefined OfflineUser::composeAndStoreDisplayName() - fixes #23248
This commit is contained in:
parent
cb10ca5c23
commit
ac5987a017
|
@ -384,8 +384,14 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
|
|||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue