From 5bf111e75f1474c0f9baa0f3e2c8ced504533abd Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 19 Mar 2013 11:16:57 +0100 Subject: [PATCH] LDAP: check whether user exists for before trying to determine displayname --- apps/user_ldap/user_ldap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 6af876e483f..1277e074714 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -222,6 +222,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { * @return display name */ public function getDisplayName($uid) { + if(!$this->userExists($uid)) { + return false; + } + $cacheKey = 'getDisplayName'.$uid; if(!is_null($displayName = $this->connection->getFromCache($cacheKey))) { return $displayName; -- 2.39.5