From 0f4e02b6fcebba6e8ac53f2cb451e8751abeece7 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 19 Mar 2013 00:23:59 +0100 Subject: [PATCH] LDAP: avoid irritating log output --- apps/user_ldap/lib/access.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 90d026962d..6d32e9b2ab 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -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; }