Fixed model/search restricted auditor domain handling

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2023-06-13 21:12:33 +02:00
parent 3af085ab91
commit 573fd62860

View File

@ -65,7 +65,13 @@ class ModelSearchSearch extends Model {
if(RESTRICTED_AUDITOR == 1) {
$session_domains = $session->get('auditdomains');
$sd = $this->fix_email_address_for_sphinx($session->get('domain'));
$sd = "";
$domains = $session->get('domain');
foreach ($domains as $d) {
if($sd) { $sd .= '|'; }
$sd .= $this->fix_email_address_for_sphinx($d);
}
foreach ($session_domains as $d) {
if($d) { $sd .= '|' . $this->fix_email_address_for_sphinx($d); }