diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index d4c0dc8fe979d1f3e4675a5f8379e5871c7e575c..3ae2e6c4c5ede827e7bf481525c9e222bda0eafd 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -160,13 +160,14 @@ class UserController { ob_end_flush(); } } - if (isset($_GET['userAction'])) { - if ($_GET['userAction'] === 'getUser') { - unset($_GET['userAction']); - echo json_encode($this->getUser($_SESSION['user_id'])); + if (isset($_GET['userAction'])) { + if ($_GET['userAction'] === 'getUser') { + unset($_GET['userAction']); + session_start(); + echo json_encode($this->getUser($_SESSION['user_id'])); + } } } - } } ?> \ No newline at end of file