From 467510201e64d8913ea0d1f4d3e4242fcb3f1d15 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 5 Dec 2008 16:15:10 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSldapObject=20:=20Modification=20de=20la?= =?UTF-8?q?=20m=C3=A9thode=20getObjetFilter()=20pour=20permettre=20=09de?= =?UTF-8?q?=20prendre=20en=20compte=20un=20filtre=20positionn=C3=A9=20par?= =?UTF-8?q?=20l'utilisateur=20dans=20la=20=09configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/includes/class/class.LSldapObject.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; }