From 03b27176ef522cdf1cfbe44d426592ab86932781 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 9 Sep 2007 17:58:13 +0000 Subject: Applied patch for LDAP version (#1484552) --- program/include/rcube_ldap.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'program') diff --git a/program/include/rcube_ldap.inc b/program/include/rcube_ldap.inc index e6a15d9dc..3de018426 100644 --- a/program/include/rcube_ldap.inc +++ b/program/include/rcube_ldap.inc @@ -86,11 +86,14 @@ class rcube_ldap if (!is_array($this->prop['hosts'])) $this->prop['hosts'] = array($this->prop['hosts']); + if (empty($this->prop['ldap_version'])) + $this->prop['ldap_version'] = 3; + foreach ($this->prop['hosts'] as $host) { if ($lc = @ldap_connect($host, $this->prop['port'])) { - ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['port']); + ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']); $this->prop['host'] = $host; $this->conn = $lc; break; -- cgit v1.2.3