Update pdo.php

When the user is not logged in then set the domain_uuid and domain_name based on domain from the URL.
This commit is contained in:
FusionPBX 2020-10-26 19:20:39 -06:00 committed by GitHub
parent b5f85d43ca
commit 8d4d42bbe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 9 deletions

View File

@ -306,6 +306,7 @@ if ($db_type == "pgsql") {
if (is_array($domains)) {
foreach($domains as $row) {
if (!isset($_SESSION['username'])) {
if (count($domains) == 1) {
$_SESSION["domain_uuid"] = $row["domain_uuid"];
$_SESSION["domain_name"] = $row['domain_name'];
@ -316,6 +317,7 @@ if ($db_type == "pgsql") {
$_SESSION["domain_name"] = $row["domain_name"];
}
}
}
$_SESSION['domains'][$row['domain_uuid']] = $row;
}
unset($domains, $prep_statement);