empty SessionID sends the user to login page
If the session is empty, it now sends you to the login page with a safed url so it can revert you back to the right page after login
This commit is contained in:
@@ -3,10 +3,10 @@ session_start();
|
||||
|
||||
require_once "../../queries/post.php";
|
||||
require_once "../../queries/user.php";
|
||||
|
||||
if (isset($_SESSION["userID"]) and
|
||||
getRoleByID($_SESSION["userID"]) != 'frozen' and
|
||||
getRoleByID($_SESSION["userID"]) != 'banned') {
|
||||
if (!isset($_SESSION["userID"])) {
|
||||
echo "logged out";
|
||||
} else if (getRoleByID($_SESSION["userID"]) != 'frozen' and
|
||||
getRoleByID($_SESSION["userID"]) != 'banned') {
|
||||
|
||||
if (empty($_POST["postID"]) or empty($_SESSION["userID"])) {
|
||||
header('HTTP/1.1 500 Non enough arguments');
|
||||
|
||||
Reference in New Issue
Block a user