diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-30 13:10:45 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-30 13:10:45 +0000 |
| commit | d094b852d13ad643af6eeeeb39c455c726c362fc (patch) | |
| tree | 0d9b83c280082e55db63901e5731fa952d964c0e /roundcubemail/program/include/rcube_ldap.php | |
| parent | c96fbd6314312333919931449e1b4b0eb07d9cf8 (diff) | |
- Add possibility to do LDAP bind before searching for bind DN.
In deployments where anonymous binds to and/or searches on an LDAP tree are not
allowed, and where the LDAP address book(s) have been configured to use the
user-specific bind credentials, rcube_ldap.php needs to bind using service
credentials in order to be able to find the user's bind dn.
git-svn-id: https://svn.roundcube.net/trunk@5515 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index 58e2ca921..4d65bfa7a 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/program/include/rcube_ldap.php @@ -236,6 +236,10 @@ class rcube_ldap extends rcube_addressbook $replaces = array('%dn' => '', '%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u); if ($this->prop['search_base_dn'] && $this->prop['search_filter']) { + if (!empty$this->prop['search_bind_dn']) && !empty($this->prop['search_bind_pw'])) { + $this->bind($this->prop['search_bind_dn'], $this->prop['search_bind_pw']); + } + // Search for the dn to use to authenticate $this->prop['search_base_dn'] = strtr($this->prop['search_base_dn'], $replaces); $this->prop['search_filter'] = strtr($this->prop['search_filter'], $replaces); |
