Added http response code
This commit is contained in:
@@ -25,26 +25,23 @@ if(isset($_POST['login'])){
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['token'] = $token;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: ../../../Frontend/index.php?login=success');
|
||||
exit();
|
||||
//header('location: ../../../Frontend/index.php?login=success');
|
||||
//exit();
|
||||
http_response_code(200);
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=token');
|
||||
exit();
|
||||
http_response_code(500);
|
||||
}
|
||||
|
||||
}else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=password');
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
}else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=group');
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user