diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-28 17:41:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 17:41:02 +0200 |
commit | 83c64f3485dec34e146d0ccc1fd4bf0c7f069c6f (patch) | |
tree | 5b869e9272685de9fad470185572b1a0f4c58db8 /apps/user_ldap | |
parent | bf7afcdaceee39c8b3ca1c143c24eae798721aef (diff) | |
parent | 1177c70b9d153e0c50c703182a11447bd3e30f95 (diff) | |
download | nextcloud-server-83c64f3485dec34e146d0ccc1fd4bf0c7f069c6f.tar.gz nextcloud-server-83c64f3485dec34e146d0ccc1fd4bf0c7f069c6f.zip |
Merge pull request #590 from nextcloud/fixing-undefined-OfflineUser-composeAndStoreDisplayName
Fix undefined OfflineUser::composeAndStoreDisplayName()
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 7e5968e9003..ce1aafc210e 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -395,8 +395,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; } |