]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix error logging
authorCraig Andrews <candrews@integralblue.com>
Wed, 10 Mar 2010 02:26:12 +0000 (21:26 -0500)
committerCraig Andrews <candrews@integralblue.com>
Wed, 10 Mar 2010 02:26:48 +0000 (21:26 -0500)
plugins/LdapAuthorization/LdapAuthorizationPlugin.php

index 2608025ddc82975939e5669859226b0c99d3b041..042b2db8d8796905a8a1df2695d31395ae452d01 100644 (file)
@@ -131,13 +131,13 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
     {
         $ldap = $this->ldap_get_connection();
         $link = $ldap->getLink();
-        $r = ldap_compare($link, $groupDn, $this->uniqueMember_attribute, $userDn);
+        $r = @ldap_compare($link, $groupDn, $this->uniqueMember_attribute, $userDn);
         if ($r === true){
             return true;
         }else if($r === false){
             return false;
         }else{
-            common_log(LOG_ERR, ldap_error($r));
+            common_log(LOG_ERR, "LDAP error determining if userDn=$userDn is a member of groupDn=groupDn using uniqueMember_attribute=$this->uniqueMember_attribute error: ".ldap_error($link));
             return false;
         }
     }