2013-06-04
jhilaire
Hello,
In dokuwiki Weatherwax (2013-05-10), deference ldap alias doesn't work in the default ldap plugin (tested on openldap).
Even if in file "conf/local.php" I add this line:
$conf['plugin']['authldap']['deref'] = '3';
To work, I edit the file lib/plugins/authldap/auth.php as follow (in comment this is the original code):
line 504:
protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,
//$attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) {
$attrsonly = 0, $sizelimit = 0, $timelimit = 0 ) {
if(is_null($attributes)) $attributes = array();
if($scope == 'base') {
return @ldap_read(
$link_identifier, $base_dn, $filter, $attributes,
//$attrsonly, $sizelimit, $timelimit, $deref
$attrsonly, $sizelimit, $timelimit
);
} elseif($scope == 'one') {
return @ldap_list(
$link_identifier, $base_dn, $filter, $attributes,
//$attrsonly, $sizelimit, $timelimit, $deref
$attrsonly, $sizelimit, $timelimit
);
} else {
return @ldap_search(
$link_identifier, $base_dn, $filter, $attributes,
//$attrsonly, $sizelimit, $timelimit, $deref
$attrsonly, $sizelimit, $timelimit
);
}
}