Fix call function ldap_connect but not exists
This commit is contained in:
parent
0735413e7c
commit
8ccda16ef3
@ -159,6 +159,15 @@ class Ldap
|
|||||||
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! function_exists("ldap_connect"))
|
||||||
|
{
|
||||||
|
$this->error='LDAPFunctionsNotAvailableOnPHP';
|
||||||
|
$return=-1;
|
||||||
|
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($this->error))
|
||||||
|
{
|
||||||
// Loop on each ldap server
|
// Loop on each ldap server
|
||||||
foreach ($this->server as $key => $host)
|
foreach ($this->server as $key => $host)
|
||||||
{
|
{
|
||||||
@ -236,6 +245,7 @@ class Ldap
|
|||||||
|
|
||||||
if (! $connected) $this->close();
|
if (! $connected) $this->close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($connected)
|
if ($connected)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user