From f842f7b77879c7b9fce731b9ae105a874f5491c6 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:02:53 -0700 Subject: [PATCH] Update index.php shows error on main page while logged out. --- src/forum/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/forum/index.php b/src/forum/index.php index 7707c95e..6dfc8590 100644 --- a/src/forum/index.php +++ b/src/forum/index.php @@ -43,9 +43,11 @@ $LOGGED_IN = false; -if ($member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword'])) { - $memberInfo = $member->get_info_filtered(); - $LOGGED_IN = true; +if (isset($_SESSION['btUsername']) && isset($_SESSION['btPassword'])) { + if ($member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword'])) { + $memberInfo = $member->get_info_filtered(); + $LOGGED_IN = true; + } } $breadcrumbObj->setTitle("Forum");