diff options
Diffstat (limited to 'pages/api/computer.php')
-rw-r--r-- | pages/api/computer.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pages/api/computer.php b/pages/api/computer.php index a9b87ae..f5117f9 100644 --- a/pages/api/computer.php +++ b/pages/api/computer.php @@ -6,7 +6,11 @@ if (isset($_GET["chrome"])) { } require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $_PROFILE; -if (!$isLoggedIn) header("Location: /-/login") and die(); + +if (!$isLoggedIn || !isset($_PROFILE) || !isset($_PROFILE["login"])) { + header("Location: /-/login"); + die(); +} $request_raw = file_get_contents('php://input'); $json_object = json_decode($request_raw, true); |