[Pkg-owncloud-commits] [owncloud] 387/394: LDAP: avoid irritating log output

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:57 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit d58457f4a5acb09d89b30618f91f7ec9d8af7265
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Tue Mar 19 00:23:59 2013 +0100

    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 29dc8c3..b8c601a 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -59,7 +59,10 @@ abstract class Access {
 		$dn = $this->DNasBaseParameter($dn);
 		$rr = @ldap_read($cr, $dn, 'objectClass=*', 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;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list