summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/user_ldap/user_ldap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 44a19478598..e3a8ba6812c 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;