Fix error logging

This commit is contained in:
Craig Andrews 2010-03-09 21:26:12 -05:00
parent 6ea7e1c06e
commit 9653cb9f0a

View 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;
}
}