From: Joey Schulze Date: Fri, 26 Feb 2010 22:37:06 +0000 (+0100) Subject: Handle logout X-Git-Tag: 2010-06-02_customer~194 X-Git-Url: https://git.infodrom.org/?p=misc%2Fkostenrechnung;a=commitdiff_plain;h=ca805dffe07680253a573fe16ff488d04c2298fc Handle logout --- diff --git a/lib/general.php b/lib/general.php index 6216e34..524be12 100644 --- a/lib/general.php +++ b/lib/general.php @@ -7,6 +7,12 @@ function passwd($login,$pass) function check_session() { + if (!empty($_SESSION['sys']['login']) && !empty($_GET['logout'])) { + session_destroy(); + header('Location: ./?login=true'); + exit(); + } + if (!empty($_POST['login']) && !empty($_POST['passwd'])) { require_once('lib/login.php'); if (check_passwd()) {