diff --git a/public/index.php b/public/index.php index c0e48f3..48cc905 100644 --- a/public/index.php +++ b/public/index.php @@ -25,6 +25,12 @@ if (($uri === '/' || $uri === '/index.php') && $page === null) { // Routing basierend auf Query-Parametern if ($page === 'login') { + // Wenn bereits eingeloggt, zur Rangliste weiterleiten + if (Auth::check()) { + header('Location: /index.php?page=ranking'); + exit; + } + if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = $_POST['email'] ?? ''; $password = $_POST['password'] ?? '';