]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: check whether user exists for before trying to determine displayname
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 19 Mar 2013 10:16:57 +0000 (11:16 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Tue, 19 Mar 2013 10:16:57 +0000 (11:16 +0100)
apps/user_ldap/user_ldap.php

index 6af876e483f945c8aef152ec12704b4957dc1cde..1277e074714619b9fea87c232a475a8da17cc097 100644 (file)
@@ -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;