login checks work

This commit is contained in:
Joshua Perry 2023-01-25 13:29:12 +00:00
parent 3e82a7d806
commit 6064009729
2 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class EntryPoint {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$functionName = $functionName . 'Submit';
}
$this->routes->checkLogin($route);
$page = $this->routes->getController($controllerName, $functionName);
if ($page == null) {
$page = $this->routes->notFound();

View File

@ -36,7 +36,6 @@ class Routes implements \CSY2028\Routes {
$loginRoutes = [];
//TODO: Add login routes
//$loginRoutes['user'] = true;
$loginRoutes['/admin/'] = true;
$requiresLogin = $loginRoutes[$route] ?? false;
if ($requiresLogin && !isset($_SESSION['loggedin'])) {