Amélioration gestion du LDAP
This commit is contained in:
parent
e363b1697a
commit
4ecf372650
@ -406,7 +406,7 @@ DNAdmin=Administrator DN
|
|||||||
LDAPPassword=administrator password
|
LDAPPassword=administrator password
|
||||||
DNUser=Dolibarr users' DN
|
DNUser=Dolibarr users' DN
|
||||||
DNGroup=Dolibarr groups' DN
|
DNGroup=Dolibarr groups' DN
|
||||||
LDAPServerExample=Server address (ex: localhost, 127.0.0.1, 192.168.0.2)
|
LDAPServerExample=Server address (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
||||||
#LDAPSuffixExample=Complete DN (ex: dc=company,dc=com)
|
#LDAPSuffixExample=Complete DN (ex: dc=company,dc=com)
|
||||||
DNAdminExample=Complete DN (ex: cn=adminldap,dc=society,dc=com)
|
DNAdminExample=Complete DN (ex: cn=adminldap,dc=society,dc=com)
|
||||||
LDAPPasswordExample=Admin password
|
LDAPPasswordExample=Admin password
|
||||||
|
|||||||
@ -406,7 +406,7 @@ DNAdmin=DN de l'administrateur
|
|||||||
LDAPPassword=Mot de passe de l'administrateur
|
LDAPPassword=Mot de passe de l'administrateur
|
||||||
DNUser=DN des utilisateurs Dolibarr
|
DNUser=DN des utilisateurs Dolibarr
|
||||||
DNGroup=DN des groupes Dolibarr
|
DNGroup=DN des groupes Dolibarr
|
||||||
LDAPServerExample=Adresse du serveur (ex: localhost, 127.0.0.1, 192.168.0.2)
|
LDAPServerExample=Adresse du serveur (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
||||||
#LDAPSuffixExample=DN complet (ex: dc=societe,dc=com)
|
#LDAPSuffixExample=DN complet (ex: dc=societe,dc=com)
|
||||||
DNAdminExample=DN complet (ex: cn=adminldap,dc=societe,dc=com)
|
DNAdminExample=DN complet (ex: cn=adminldap,dc=societe,dc=com)
|
||||||
LDAPPasswordExample=Mot de passe de l'administrateur
|
LDAPPasswordExample=Mot de passe de l'administrateur
|
||||||
|
|||||||
@ -42,7 +42,17 @@ function dolibarr_ldap_connect()
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$ldapconnect = ldap_connect($conf->global->LDAP_SERVER_HOST,$conf->global->LDAP_SERVER_PORT);
|
if (ereg('^ldap',$conf->global->LDAP_SERVER_HOST))
|
||||||
|
{
|
||||||
|
// ex url: ldaps://ldap.example.com/
|
||||||
|
$ldapconnect = ldap_connect($conf->global->LDAP_SERVER_HOST);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ex serveur: localhost
|
||||||
|
// ex port: 329
|
||||||
|
$ldapconnect = ldap_connect($conf->global->LDAP_SERVER_HOST,$conf->global->LDAP_SERVER_PORT);
|
||||||
|
}
|
||||||
|
|
||||||
if ($ldapconnect)
|
if ($ldapconnect)
|
||||||
{
|
{
|
||||||
@ -54,7 +64,7 @@ function dolibarr_ldap_connect()
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief bind au serveur ldap.
|
\brief Se connecte au serveur LDAP avec user et mot de passe
|
||||||
\param ds
|
\param ds
|
||||||
\return bool
|
\return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user