LSldapObject :: Fixed validation test

This commit is contained in:
Benjamin Renard 2012-05-08 16:45:23 +02:00
parent 093aebd6b9
commit b6d984f6c5

View file

@ -466,13 +466,15 @@ class LSldapObject {
if(isset($test['object_type'])) { if(isset($test['object_type'])) {
$test_obj = new $test['object_type'](); $test_obj = new $test['object_type']();
$sfilter=$test_obj->getObjectFilter(); $sfilter=$test_obj->getObjectFilter();
$sfilter='(&'.$sfilter; if ($sfilter_user) {
if($sfilter_user[0]=='(') { $sfilter='(&'.$sfilter;
$sfilter=$sfilter.$sfilter_user.')'; if($sfilter_user[0]=='(') {
} $sfilter=$sfilter.$sfilter_user.')';
else { }
$sfilter=$sfilter.'('.$sfilter_user.'))'; else {
} $sfilter=$sfilter.'('.$sfilter_user.'))';
}
}
} }
else { else {
$sfilter=$sfilter_user; $sfilter=$sfilter_user;