diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-08-15 20:28:01 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-08-15 20:28:01 +0000 |
| commit | 0b8aaa7fccc80a9ec625c20b0937047ccf3a03bc (patch) | |
| tree | 48cc55cc54bbbaf9dd3aca0e78835ce8a0276d51 /roundcubemail/program/include/rcube_ldap.inc | |
| parent | 10b95da1ed18f629c3146cc2e18fffc1ba61fe2a (diff) | |
LDAP improvements
git-svn-id: https://svn.roundcube.net/trunk@677 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.inc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.inc b/roundcubemail/program/include/rcube_ldap.inc index 976b73d2b..e6a15d9dc 100644 --- a/roundcubemail/program/include/rcube_ldap.inc +++ b/roundcubemail/program/include/rcube_ldap.inc @@ -58,7 +58,6 @@ class rcube_ldap if (preg_match('/^(.+)_field$/', $prop, $matches)) $this->fieldmap[$matches[1]] = $value; - // $this->filter = "(dn=*)"; $this->connect(); } @@ -142,7 +141,10 @@ class rcube_ldap function close() { if ($this->conn) + { @ldap_unbind($this->conn); + $this->conn = null; + } } @@ -212,6 +214,13 @@ class rcube_ldap */ function list_records($cols=null, $subset=0) { + // add general filter to query + if (!empty($this->prop['filter'])) + { + $filter = $this->prop['filter']; + $this->set_search_set($filter); + } + // exec LDAP search if no result resource is stored if ($this->conn && !$this->ldap_result) $this->_exec_search(); @@ -442,4 +451,4 @@ class rcube_ldap } -?>
\ No newline at end of file +?> |
