From e1619a1fd148526d31932e3edbd1798f025c6b9e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 22 Oct 2020 01:54:41 -0600 Subject: [PATCH] Update check_auth.php Set the context and domain_name when the user authenticates. --- resources/check_auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/check_auth.php b/resources/check_auth.php index 462b43abc9..f792229104 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -74,6 +74,7 @@ if ($result["authorized"] === "true") { //set the session variables $_SESSION["domain_uuid"] = $result["domain_uuid"]; + $_SESSION["domain_name"] = $result["domain_name"]; $_SESSION["user_uuid"] = $result["user_uuid"]; //user session array @@ -246,9 +247,10 @@ $_SESSION['user']['extension'][$x]['user_context'] = $row['user_context']; $_SESSION['user']['extension'][$x]['description'] = $row['description']; - //set the user context + //set the context $_SESSION['user']['user_context'] = $row["user_context"]; $_SESSION['user_context'] = $row["user_context"]; + $_SESSION['context'] = $_SESSION["domain_name"]; } } unset($sql, $parameters, $result, $row);