|
|
@ -175,9 +175,11 @@ class rcube_ldap_generic
|
|
|
|
$this->_debug("C: Connect to $hostname [{$this->config['name']}]");
|
|
|
|
$this->_debug("C: Connect to $hostname [{$this->config['name']}]");
|
|
|
|
|
|
|
|
|
|
|
|
if ($lc = @ldap_connect($host, $this->config['port'])) {
|
|
|
|
if ($lc = @ldap_connect($host, $this->config['port'])) {
|
|
|
|
if ($this->config['use_tls'] === true)
|
|
|
|
if ($this->config['use_tls'] === true) {
|
|
|
|
if (!ldap_start_tls($lc))
|
|
|
|
if (!ldap_start_tls($lc)) {
|
|
|
|
continue;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->_debug("S: OK");
|
|
|
|
$this->_debug("S: OK");
|
|
|
|
|
|
|
|
|
|
|
@ -186,7 +188,7 @@ class rcube_ldap_generic
|
|
|
|
$this->conn = $lc;
|
|
|
|
$this->conn = $lc;
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($this->config['network_timeout']))
|
|
|
|
if (!empty($this->config['network_timeout']))
|
|
|
|
ldap_set_option($lc, LDAP_OPT_NETWORK_TIMEOUT, $this->config['network_timeout']);
|
|
|
|
ldap_set_option($lc, LDAP_OPT_NETWORK_TIMEOUT, $this->config['network_timeout']);
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($this->config['referrals']))
|
|
|
|
if (isset($this->config['referrals']))
|
|
|
|
ldap_set_option($lc, LDAP_OPT_REFERRALS, $this->config['referrals']);
|
|
|
|
ldap_set_option($lc, LDAP_OPT_REFERRALS, $this->config['referrals']);
|
|
|
|