Change the indentation. Add a conditional include.

This commit is contained in:
markjcrane
2015-07-28 10:42:07 -06:00
parent e255e7eb0c
commit 3f4a674364
+27 -18
View File
@@ -91,6 +91,8 @@ require_once "resources/require.php";
} }
} }
} }
//set the domain parent uuid
$_SESSION['domain_parent_uuid'] = $_SESSION["domain_uuid"];
} }
//get the username or key //get the username or key
@@ -287,24 +289,25 @@ require_once "resources/require.php";
exit; exit;
} }
else { else {
foreach ($result as &$row) { //set the user settings
//allow the user to choose a template only if the template has not been assigned by the superadmin foreach ($result as &$row) {
if (strlen($_SESSION['domain']['template']['name']) == 0) { //allow the user to choose a template only if the template has not been assigned by the superadmin
$_SESSION['domain']['template']['name'] = $row["user_template_name"]; if (strlen($_SESSION['domain']['template']['name']) == 0) {
} $_SESSION['domain']['template']['name'] = $row["user_template_name"];
//user defined time zone }
$_SESSION["time_zone"]["user"] = ''; //user defined time zone
if (strlen($row["user_time_zone"]) > 0) { $_SESSION["time_zone"]["user"] = '';
//user defined time zone if (strlen($row["user_time_zone"]) > 0) {
$_SESSION["time_zone"]["user"] = $row["user_time_zone"]; //user defined time zone
} $_SESSION["time_zone"]["user"] = $row["user_time_zone"];
// add session variables }
$_SESSION["user_uuid"] = $row["user_uuid"]; // add session variables
// user session array $_SESSION["user_uuid"] = $row["user_uuid"];
$_SESSION["user"]["username"] = $row["username"]; // user session array
$_SESSION["user"]["user_uuid"] = $row["user_uuid"]; $_SESSION["user"]["username"] = $row["username"];
$_SESSION["user"]["contact_uuid"] = $row["contact_uuid"]; $_SESSION["user"]["user_uuid"] = $row["user_uuid"];
} $_SESSION["user"]["contact_uuid"] = $row["contact_uuid"];
}
} }
//get the groups assigned to the user and then set the groups in $_SESSION["groups"] //get the groups assigned to the user and then set the groups in $_SESSION["groups"]
@@ -390,6 +393,12 @@ require_once "resources/require.php";
exit(); exit();
} }
} }
//get the domains
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/domains/app_config.php")){
require_once "app/domains/resources/domains.php";
}
} }
//set the time zone //set the time zone