From 6f300d7676aa36903c1a279aeb100d6f4caf1197 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sat, 21 Mar 2026 22:57:36 +0100 Subject: Replace home page with redirect to gallery or login --- src/app/Controllers/HomeController.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/app/Controllers/HomeController.php') diff --git a/src/app/Controllers/HomeController.php b/src/app/Controllers/HomeController.php index 8c462a0..f73e550 100644 --- a/src/app/Controllers/HomeController.php +++ b/src/app/Controllers/HomeController.php @@ -1,21 +1,18 @@ getPdo(); - $stmt = $db->query('SELECT 1'); - $dbStatus = $stmt ? 'Connected' : 'Failed'; - - $content = __DIR__ . '/../Views/home/index.php'; - include __DIR__ . '/../Views/layouts/main.php'; + if (isset($_SESSION['user_id'])) { + header('Location: /gallery'); + } else { + header('Location: /login'); + } } } -- cgit v1.2.3