From 8269494306728151ca26fefcae44b1fce06272f2 Mon Sep 17 00:00:00 2001 From: wartana Date: Thu, 22 Jan 2026 16:16:17 +0800 Subject: [PATCH] Fix logout issue for kaur level: improve session destruction in logout.php and capture href before async in confirmLogout --- index.php | 3 ++- logout.php | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index db93091..0bff4aa 100644 --- a/index.php +++ b/index.php @@ -801,6 +801,7 @@ function confirmLogout(event) { event.preventDefault(); + var logoutUrl = event.currentTarget.href; Swal.fire({ title: 'Konfirmasi Logout', text: 'Apakah Anda yakin akan keluar dari sistem?', @@ -812,7 +813,7 @@ cancelButtonText: 'Batal' }).then((result) => { if (result.isConfirmed) { - window.location.href = event.currentTarget.href; + window.location.href = logoutUrl; } }); } diff --git a/logout.php b/logout.php index 69fc55f..2e20a21 100644 --- a/logout.php +++ b/logout.php @@ -1,4 +1,25 @@ -location='login.php'"; + \ No newline at end of file