Fix error logging
This commit is contained in:
parent
6ea7e1c06e
commit
9653cb9f0a
@ -131,13 +131,13 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
|
|||||||
{
|
{
|
||||||
$ldap = $this->ldap_get_connection();
|
$ldap = $this->ldap_get_connection();
|
||||||
$link = $ldap->getLink();
|
$link = $ldap->getLink();
|
||||||
$r = ldap_compare($link, $groupDn, $this->uniqueMember_attribute, $userDn);
|
$r = @ldap_compare($link, $groupDn, $this->uniqueMember_attribute, $userDn);
|
||||||
if ($r === true){
|
if ($r === true){
|
||||||
return true;
|
return true;
|
||||||
}else if($r === false){
|
}else if($r === false){
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user