From 50d0f48ee4d03624232e658d412b29c2502bf204 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 44a1947859..e3a8ba6812 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -217,6 +217,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;