summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-05-12 12:13:24 +0200
committerAleksander Machniak <alec@alec.pl>2014-05-12 12:13:24 +0200
commitd5190084980835d68847a9b9c18f68c00b4cd37a (patch)
tree919dad1e0207fd9a19fd9f7c49e17e3d339e0657
parent547028280cee104c006433de64c84a4e701a2321 (diff)
Add configurable LDAP_OPT_DEREF option (#1489864) - patch from Stuart C. Naifeh
-rw-r--r--CHANGELOG1
-rw-r--r--config/defaults.inc.php2
-rw-r--r--program/lib/Roundcube/rcube_ldap_generic.php3
3 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3601908c3..57293452d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -16,6 +16,7 @@ CHANGELOG Roundcube Webmail
- Set In-Reply-To and References for forwarded messages (#1489593)
- Removed redundant default_folders config option (#1489737)
- Implemented IMAP SPECIAL-USE extension support [RFC6154] (#1487830)
+- Add configurable LDAP_OPT_DEREF option (#1489864)
- Fix mbox files import
RELEASE 1.0.1
diff --git a/config/defaults.inc.php b/config/defaults.inc.php
index a76eec6dc..85190eb0a 100644
--- a/config/defaults.inc.php
+++ b/config/defaults.inc.php
@@ -784,6 +784,8 @@ $config['ldap_public']['Verisign'] = array(
'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 f1048ef39..f6f9884d8 100644
--- a/program/lib/Roundcube/rcube_ldap_generic.php
+++ b/program/lib/Roundcube/rcube_ldap_generic.php
@@ -190,6 +190,9 @@ class rcube_ldap_generic
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");