Fix. Show registrations to sip profile with force-XXX-domain.

When on profile set `force-register-db-domain` realm on xmlstatus is just IP but user is like 101@domain.name.
This commit is contained in:
Alexey Melnichuk 2015-07-07 13:39:57 +04:00
parent 60706b6278
commit 86a961e46b
1 changed files with 8 additions and 2 deletions

View File

@ -110,8 +110,14 @@ require_once "resources/check_auth.php";
//remove unrelated domains
if (count($_SESSION["domains"]) > 1) {
if (!(permission_exists('registration_all') && $show == "all")) {
if ($registrations[$x]['sip-auth-realm'] != $_SESSION['domain_name']) {
unset($registrations[$x]);
if ($registrations[$x]['sip-auth-realm'] == $_SESSION['domain_name']) {}
else {
$tmp = explode('@', $registrations[$x]['user'], 2);
if($tmp[1] == $_SESSION['domain_name']){}
else {
unset($registrations[$x]);
}
unset($tmp);
}
}
}