From 15320854f3a8983b3269acb3822c4a2dbe0fcac7 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 3 Jul 2024 18:15:32 +0300 Subject: [PATCH] Fixes login issues --- public_html/index.php | 2 +- public_html/templates/menu.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public_html/index.php b/public_html/index.php index af0a781..9c5c549 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -49,7 +49,7 @@ if (isset($_COOKIE['username'])) { } // redirect to login -if ( !isset($_SESSION['user_id']) && ($page !== 'login' && $page !== 'register') ) { +if ( !isset($_COOKIE['username']) && ($page !== 'login' && $page !== 'register') ) { header('Location: index.php?page=login'); exit(); } diff --git a/public_html/templates/menu.php b/public_html/templates/menu.php index 4131410..65d8428 100644 --- a/public_html/templates/menu.php +++ b/public_html/templates/menu.php @@ -2,13 +2,13 @@