Browse Source

Applied patch for LDAP version (#1484552)

release-0.6
thomascube 18 years ago
parent
commit
03b27176ef
  1. 6
      CHANGELOG
  2. 1
      config/main.inc.php.dist
  3. 5
      program/include/rcube_ldap.inc

6
CHANGELOG

@ -1,6 +1,12 @@
CHANGELOG RoundCube Webmail
---------------------------
2007/09/09 (thomasb)
----------
- Applied patch for LDAP version (#1484552)
- Improved XHTML validation
2007/09/05 (thomasb)
----------
- Fix message list selection (#1484550)

1
config/main.inc.php.dist

@ -199,6 +199,7 @@ $rcmail_config['mail_header_delimiter'] = NULL;
* 'base_dn' => '',
* 'bind_dn' => '',
* 'bind_pass' => '',
* 'ldap_version' => 3, // using LDAPv3
* 'search_fields' => array('mail', 'cn'), // fields to search in
* 'name_field' => 'cn', // this field represents the contact's name
* 'email_field' => 'mail', // this field represents the contact's e-mail

5
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;

Loading…
Cancel
Save