Fix #3215 [User card] [Contact card] [Member card] Error in LDAP tab
This commit is contained in:
parent
db3c544e21
commit
9aec4d554b
@ -263,7 +263,7 @@ if (function_exists("ldap_connect"))
|
|||||||
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
|
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
|
||||||
|
|
||||||
$result = $ldap->connect_bind();
|
$result = $ldap->connect_bind();
|
||||||
if ($result)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Test ldap connect and bind
|
// Test ldap connect and bind
|
||||||
print img_picto('','info').' ';
|
print img_picto('','info').' ';
|
||||||
|
|||||||
@ -156,8 +156,15 @@ class Ldap
|
|||||||
if (count($this->server) == 0 || empty($this->server[0]))
|
if (count($this->server) == 0 || empty($this->server[0]))
|
||||||
{
|
{
|
||||||
$this->error='LDAP setup (file conf.php) is not complete';
|
$this->error='LDAP setup (file conf.php) is not complete';
|
||||||
$return=-1;
|
|
||||||
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! function_exists('ldap_connect'))
|
||||||
|
{
|
||||||
|
$this->error='Your PHP need extension ldap';
|
||||||
|
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop on each ldap server
|
// Loop on each ldap server
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user