From 4d6328abc42ed3685ce20872337324b764753c8c Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 17 Oct 2012 03:16:22 +0000 Subject: [PATCH] Only filter out unrelated domains when the system has more than one domain. Single tenant systems show all registrations. --- app/registrations/status_registrations.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/registrations/status_registrations.php b/app/registrations/status_registrations.php index f3110af86f..dad37a7375 100644 --- a/app/registrations/status_registrations.php +++ b/app/registrations/status_registrations.php @@ -98,14 +98,16 @@ require_once "includes/checkauth.php"; $registrations[$x]['status'] = $row->{'status'}; //remove unrelated domains - if (count($_SESSION["domains"]) > 1 && !permission_exists('registrations_all')) { - if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) { - unset($registrations[$x]); + if (count($_SESSION["domains"]) > 1) { + if (count($_SESSION["domains"]) > 1 && !permission_exists('registrations_all')) { + if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) { + unset($registrations[$x]); + } } - } - else { - if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) { - unset($registrations[$x]); + else { + if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) { + unset($registrations[$x]); + } } } //increment the array id