From 771ed1e778dfa6e2e44942be9d0ec165185c4edf Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 18 Dec 2009 14:41:43 +0000 Subject: [PATCH] Fix: parametre ldap propre a l'entite --- htdocs/includes/modules/modLdap.class.php | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/htdocs/includes/modules/modLdap.class.php b/htdocs/includes/modules/modLdap.class.php index 4765863b223..dcfe48dbfc7 100644 --- a/htdocs/includes/modules/modLdap.class.php +++ b/htdocs/includes/modules/modLdap.class.php @@ -42,6 +42,8 @@ class modLdap extends DolibarrModules */ function modLdap($DB) { + global $conf; + $this->db = $DB ; $this->numero = 200 ; @@ -66,19 +68,19 @@ class modLdap extends DolibarrModules // Constants $this->const = array( - 0=>array('LDAP_SERVER_TYPE','chaine','openldap','',0), - 1=>array('LDAP_SERVER_PROTOCOLVERSION','chaine','3','',0), - 2=>array('LDAP_SERVER_HOST','chaine','localhost','',0), - 3=>array('LDAP_USER_DN','chaine','ou=users,dc=my-domain,dc=com','',0), - 4=>array('LDAP_GROUP_DN','chaine','ou=groups,dc=my-domain,dc=com','',0), - 5=>array('LDAP_FILTER_CONNECTION','chaine','&(objectClass=user)(objectCategory=person)','',0), - 6=>array('LDAP_FIELD_LOGIN','chaine','uid','',0), - 7=>array('LDAP_FIELD_NAME','chaine','sn','',0), - 8=>array('LDAP_FIELD_FIRSTNAME','chaine','givenname','',0), - 9=>array('LDAP_FIELD_MAIL','chaine','mail','',0), - 10=>array('LDAP_FIELD_PHONE','chaine','telephonenumber','',0), - 11=>array('LDAP_FIELD_FAX','chaine','facsimiletelephonenumber','',0), - 12=>array('LDAP_FIELD_MOBILE','chaine','mobile','',0), + 0=>array('LDAP_SERVER_TYPE','chaine','openldap','',$conf->entity), + 1=>array('LDAP_SERVER_PROTOCOLVERSION','chaine','3','',$conf->entity), + 2=>array('LDAP_SERVER_HOST','chaine','localhost','',$conf->entity), + 3=>array('LDAP_USER_DN','chaine','ou=users,dc=my-domain,dc=com','',$conf->entity), + 4=>array('LDAP_GROUP_DN','chaine','ou=groups,dc=my-domain,dc=com','',$conf->entity), + 5=>array('LDAP_FILTER_CONNECTION','chaine','&(objectClass=user)(objectCategory=person)','',$conf->entity), + 6=>array('LDAP_FIELD_LOGIN','chaine','uid','',$conf->entity), + 7=>array('LDAP_FIELD_NAME','chaine','sn','',$conf->entity), + 8=>array('LDAP_FIELD_FIRSTNAME','chaine','givenname','',$conf->entity), + 9=>array('LDAP_FIELD_MAIL','chaine','mail','',$conf->entity), + 10=>array('LDAP_FIELD_PHONE','chaine','telephonenumber','',$conf->entity), + 11=>array('LDAP_FIELD_FAX','chaine','facsimiletelephonenumber','',$conf->entity), + 12=>array('LDAP_FIELD_MOBILE','chaine','mobile','',$conf->entity), ); // Boites