From 2424fb56edbeabc40e70c7344979d55840762d71 Mon Sep 17 00:00:00 2001 From: max/sooulix Date: Wed, 12 Feb 2025 11:00:37 +0100 Subject: [PATCH] fix logout --- src/auth.php | 5 +++++ src/index.php | 1 + 2 files changed, 6 insertions(+) diff --git a/src/auth.php b/src/auth.php index fc7a6dd..45148ae 100644 --- a/src/auth.php +++ b/src/auth.php @@ -10,6 +10,11 @@ function login() } } +if (isset($_POST['logout'])) +{ + session_destroy(); +} + session_start(); if (isset($_POST['user']) && isset($_POST['password'])) diff --git a/src/index.php b/src/index.php index 4c1a2af..892b140 100644 --- a/src/index.php +++ b/src/index.php @@ -44,6 +44,7 @@ else if ($selected_dir)