Add a session user array.

This commit is contained in:
Mark Crane 2012-11-22 00:33:42 +00:00
parent 161305f84d
commit f51f08f03c
1 changed files with 7 additions and 3 deletions

View File

@ -118,7 +118,6 @@ session_start();
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($php_self)."&msg=".urlencode($msg));
exit;
}
$_SESSION["username"] = check_str($_REQUEST["username"]);
foreach ($result as &$row) {
//allow the user to choose a template only if the template has not been assigned by the superadmin
if (strlen($_SESSION['domain']['template']['name']) == 0) {
@ -130,8 +129,13 @@ session_start();
//user defined time zone
$_SESSION["time_zone"]["user"] = $row["user_time_zone"];
}
// add the user_uuid to the session
// add session variables
$_SESSION["user_uuid"] = $row["user_uuid"];
$_SESSION["username"] = check_str($_REQUEST["username"]);
// user session array
$_SESSION["user"]["username"] = $row["username"];
$_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"]
@ -192,4 +196,4 @@ session_start();
$v_path_show = false;
}
?>
?>