Use the domain_name to find the domain_uuid for http/https provsioning.
This commit is contained in:
@@ -32,6 +32,20 @@ require_once "includes/require.php";
|
|||||||
$tmp_array = '';
|
$tmp_array = '';
|
||||||
$device_template = '';
|
$device_template = '';
|
||||||
|
|
||||||
|
//get the domain_uuid
|
||||||
|
//get the domain
|
||||||
|
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||||
|
//get the domain_uuid
|
||||||
|
$sql = "select * from v_domains ";
|
||||||
|
$sql .= "where domain_name = '".$_SESSION['domain_name']."' ";
|
||||||
|
$prep_statement = $db->prepare($sql);
|
||||||
|
$prep_statement->execute();
|
||||||
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
foreach($result as $row) {
|
||||||
|
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||||
|
}
|
||||||
|
unset($result, $prep_statement);
|
||||||
|
|
||||||
//if password was defined in the system -> variables page then require the password.
|
//if password was defined in the system -> variables page then require the password.
|
||||||
if (strlen($_SESSION['provision']['password']['var']) > 0) {
|
if (strlen($_SESSION['provision']['password']['var']) > 0) {
|
||||||
//deny access if the password doesn't match
|
//deny access if the password doesn't match
|
||||||
|
|||||||
Reference in New Issue
Block a user