Skip to content

Commit

Permalink
Add configurable LDAP_OPT_DEREF option (#1489864) - patch from Stuart…
Browse files Browse the repository at this point in the history
… C. Naifeh

Conflicts:

	CHANGELOG
  • Loading branch information
alecpl committed May 12, 2014
1 parent 0b70f50 commit f92ccca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions config/defaults.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions program/lib/Roundcube/rcube_ldap_generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ public function connect($host = null)

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");
Expand Down

0 comments on commit f92ccca

Please sign in to comment.