diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-07-28 18:09:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 18:09:43 +0300 |
commit | 0bda5d18234059939b93f04e460181e37e6e79b6 (patch) | |
tree | 8c7bdd1dc54fe288fab937581fa54568d77e80f1 | |
parent | fe2ca83a2a410984a40253387160404341dfe805 (diff) | |
parent | c35b4f12ff49505126594c71952e8f1ccf1cd7e1 (diff) |
Merge pull request #587 from nextcloud/fixing-undefined-OfflineUser-composeAndStoreDisplayName-stable9
[stable9] Fix undefined OfflineUser::composeAndStoreDisplayName()
-rw-r--r-- | apps/user_ldap/user_ldap.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 70cceefdedf..c403f03e8da 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -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; } |