From f92cccac38f877ab3537dcb489bb4a6216334f84 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 12 May 2014 06:15:48 -0400 Subject: [PATCH] Add configurable LDAP_OPT_DEREF option (#1489864) - patch from Stuart C. Naifeh --- CHANGELOG | 4 ++++ program/lib/Roundcube/rcube_ldap_generic.php | 3 +++ config/defaults.inc.php | 2 ++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4f9f700..6d41d87 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ CHANGELOG Roundcube Webmail =========================== +- Add configurable LDAP_OPT_DEREF option (#1489864) + +RELEASE 1.0.1 +------------- - Support 'error' and 'body_file' return attribs in 'message_before_send' hook (#1489595) - Apply user-specific replacements to group's base_dn property (#1489779) - Fix missing email address when importing contacts from outlook csv (#1489830) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index ffce8e7..cdddb43 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -789,6 +789,8 @@ 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit. 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit. 'referrals' => false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups + 'dereference' => 0, // Sets the LDAP_OPT_DEREF option. One of: LDAP_DEREF_NEVER, LDAP_DEREF_SEARCHING, LDAP_DEREF_FINDING, LDAP_DEREF_ALWAYS + // Used where addressbook contains aliases to objects elsewhere in the LDAP tree. // definition for contact groups (uncomment if no groups are supported) // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above) diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php index b85afe4..16b7fda 100644 --- a/program/lib/Roundcube/rcube_ldap_generic.php +++ b/program/lib/Roundcube/rcube_ldap_generic.php @@ -190,6 +190,9 @@ if (isset($this->config['referrals'])) ldap_set_option($lc, LDAP_OPT_REFERRALS, $this->config['referrals']); + + if (isset($this->config['dereference'])) + ldap_set_option($lc, LDAP_OPT_DEREF, $this->config['dereference']); } else { $this->_debug("S: NOT OK"); -- Gitblit v1.9.1