Merge pull request #587 from nextcloud/fixing-undefined-OfflineUser-composeAndStoreDisplayName-stable9
[stable9] Fix undefined OfflineUser::composeAndStoreDisplayName()
This commit is contained in:
commit
0bda5d1823
|
@ -385,8 +385,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