mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Corrections to the LDAP configuration
This commit is contained in:
parent
2fc154bea6
commit
cb052ad1d7
@ -172,15 +172,16 @@ $c->admin_email ='calendar-admin@example.com';
|
||||
// 'bindDN'=> 'cn=manager,cn=internal,dc=tennaxia,dc=net', //DN to bind to this server enabling to perform request
|
||||
// 'passDN'=> 'xxxxxxxx', //Password of the previous bindDN to bind to this server enabling to perform request
|
||||
// 'baseDNUsers'=> 'dc=tennaxia,dc=net', //where to look at valid user
|
||||
// 'filterUsers' => 'objectClass=kolabInetOrgPerson', //filter that must validate an valid user
|
||||
// 'filterUsers' => 'objectClass=kolabInetOrgPerson', //filter that must validate an valid user syntax according :
|
||||
//http://www.faqs.org/rfcs/rfc4515.html , that's mean surroundeed by ( and )
|
||||
// 'baseDNGroups' => 'ou=divisions,dc=tennaxia,dc=net', //not used ATM
|
||||
// 'filterGroups' => 'objectClass=groupOfUniqueNames', //not used ATM
|
||||
/** /!\ "username" should be set and "updated" must be set **/
|
||||
// 'mapping_field' => array("username" => "uid",
|
||||
// "updated" => "modifyTimestamp",
|
||||
// "fullname" => "cn" ,
|
||||
// "email" =>"mail",
|
||||
// "active" => ), //used to create the user based on his ldap properties
|
||||
// "email" =>"mail"
|
||||
// ), //used to create the user based on his ldap properties
|
||||
/** used to set default value for all users, will be overcharged by ldap if defined also in mapping_field **/
|
||||
// 'default_value' => array("date_format_type" => "E","locale" => "fr_FR"),
|
||||
/** foreach key set start and length in the string provided by ldap
|
||||
|
||||
@ -149,7 +149,7 @@ function LDAP_check($username, $password ){
|
||||
if ( $ldapDriver->valid ) {
|
||||
$mapping = $c->authenticate_hook['config']['mapping_field'];
|
||||
$attributs=array_values($mapping);
|
||||
$filter="(&($ldapDriver->filterUsers)(".$mapping["username"]."=$username))";
|
||||
$filter="(& $ldapDriver->filterUsers (".$mapping["username"]."=$username))";
|
||||
dbg_error_log( "LDAP", "checking user %s for password %s against LDAP",$username,$password );
|
||||
$valid = $ldapDriver->requestUser($filter,$attributs,$password);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user