From 0854c50f4e827796afb784c0831a2bc61c6e484b Mon Sep 17 00:00:00 2001 From: james Date: Mon, 30 Nov 2009 20:15:00 +0000 Subject: [PATCH] Allow to logout even if the session has already timed out --- user_login.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/user_login.php b/user_login.php index 8b9eeb04..d6a2aa0e 100644 --- a/user_login.php +++ b/user_login.php @@ -120,11 +120,11 @@ break; case 'student': default: - exit; + if($_GET['action']!="logout") + exit; $reg_open = 'closed'; break; } - if($_POST['action']=="login" ) { if($_POST['pass'] && $_POST['user']) @@ -259,7 +259,9 @@ message_push(notice(i18n("You have been successfully logged out"))); if($type != '') - header("location: user_login.php?type=$type$redirect_url"); + header("Location: user_login.php?type={$type}{$redirect_url}"); + else + header("Location: user_login.php{$redirect_url}"); exit; } else if($_GET['action']=="recover")