diff --git a/trunk/includes/class/class.LSldapObject.php b/trunk/includes/class/class.LSldapObject.php index f9aaf093..604834b0 100644 --- a/trunk/includes/class/class.LSldapObject.php +++ b/trunk/includes/class/class.LSldapObject.php @@ -617,8 +617,14 @@ class LSldapObject { */ function getObjectFilter() { if(!isset($this -> config['objectclass'])) return; - foreach ($this -> config['objectclass'] as $class) + $filter="(&"; + foreach ($this -> config['objectclass'] as $class) { $filter.='(objectClass='.$class.')'; + } + $filter.=')'; + if ($this -> config['filter']) { + $filter="(&(".$this -> config['filter'].")$filter)"; + } return $filter; }