Corrections to the LDAP configuration

This commit is contained in:
Maxime Delorme 2007-06-11 13:49:26 +01:00 committed by Andrew McMillan
parent 2fc154bea6
commit cb052ad1d7
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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);