From 66fd566002f589a0b50de6fdf2937e026c844291 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 5 Nov 2014 15:26:09 +0100 Subject: [PATCH] LSsession / LSprofiles : fix bug resolving user's LSprofiles --- public_html/includes/class/class.LSsession.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 8d308825..d581f572 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -1492,7 +1492,17 @@ class LSsession { $LSsearch = new LSsearch($LSobject,'LSsession :: loadLSprofiles',$params,true); $LSsearch -> run(false); - self :: $LSprofiles[$profile] = $LSsearch -> listObjectsDn(); + $DNs = $LSsearch -> listObjectsDn(); + if (!is_array(self :: $LSprofiles[$profile])) { + self :: $LSprofiles[$profile]=$DNs; + } + else { + foreach($DNs as $dn) { + if (!in_array($dn,self :: $LSprofiles[$profile])) { + self :: $LSprofiles[$profile][] = $dn; + } + } + } } } }