Fix: check connectivity for avoid ldap errors
This commit is contained in:
parent
f584212700
commit
4ab1f68102
@ -195,15 +195,15 @@ class Ldap
|
|||||||
if (is_resource($this->connection))
|
if (is_resource($this->connection))
|
||||||
{
|
{
|
||||||
// Begin TLS if requested by the configuration
|
// Begin TLS if requested by the configuration
|
||||||
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
|
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
|
||||||
{
|
{
|
||||||
if (! ldap_start_tls($this->connection))
|
if (! ldap_start_tls($this->connection))
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
||||||
$connected = 0;
|
$connected = 0;
|
||||||
$this->close();
|
$this->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute the ldap_set_option here (after connect and before bind)
|
// Execute the ldap_set_option here (after connect and before bind)
|
||||||
$this->setVersion();
|
$this->setVersion();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user