summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-08-15 20:28:01 +0000
committerthomascube <thomas@roundcube.net>2007-08-15 20:28:01 +0000
commit6b603da6f16591b63f809ef967554d260bd0d891 (patch)
treeb941a1e65acd1f9b49e5a34ea277c4b6a388d765 /program/include/rcube_ldap.inc
parent88f66ec89cf87328536757ac33e508a9614bdc09 (diff)
LDAP improvements
Diffstat (limited to 'program/include/rcube_ldap.inc')
-rw-r--r--program/include/rcube_ldap.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/program/include/rcube_ldap.inc b/program/include/rcube_ldap.inc
index 976b73d2b..e6a15d9dc 100644
--- a/program/include/rcube_ldap.inc
+++ b/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
+?>