]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: avoid irritating log output
authorArthur Schiwon <blizzz@owncloud.com>
Mon, 18 Mar 2013 23:23:59 +0000 (00:23 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 18 Mar 2013 23:23:59 +0000 (00:23 +0100)
apps/user_ldap/lib/access.php

index 90d026962db618ad172c5e59f85707da8ce34fcb..6d32e9b2ab029cd619b2c7f45c8394f936ad8887 100644 (file)
@@ -62,7 +62,10 @@ abstract class Access {
                $dn = $this->DNasBaseParameter($dn);
                $rr = @ldap_read($cr, $dn, $filter, array($attr));
                if(!is_resource($rr)) {
-                       \OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
+                       if(!empty($attr)) {
+                               //do not throw this message on userExists check, irritates
+                               \OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
+                       }
                        //in case an error occurs , e.g. object does not exist
                        return false;
                }