Only filter out unrelated domains when the system has more than one domain. Single tenant systems show all registrations.

This commit is contained in:
Mark Crane 2012-10-17 03:16:22 +00:00
parent f422dcae9f
commit 4d6328abc4
1 changed files with 9 additions and 7 deletions

View File

@ -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