From 1d1843532be019c6bc1a3813ca431ea3f991cbd7 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Sun, 27 Jul 2014 00:56:45 +0000 Subject: [PATCH] Login: Minor session adjustment to /index.php (allows refresh to change background image, like /login.php). --- index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 95a3d81b67..50b8a1dcca 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ */ include "root.php"; -//clear the session variables +// start the session session_start(); //if config.php file does not exist then redirect to the install page @@ -45,6 +45,12 @@ include "root.php"; exit; } +// if not logged in, clear the session variables +if (strlen($_SESSION["username"]) == 0) { + session_unset(); + session_destroy(); +} + //adds multiple includes require_once "resources/require.php";