projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6ea10b7
)
Handle logout
author
Joey Schulze
<joey@infodrom.org>
Fri, 26 Feb 2010 22:37:06 +0000
(23:37 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Fri, 26 Feb 2010 22:37:06 +0000
(23:37 +0100)
lib/general.php
patch
|
blob
|
history
diff --git
a/lib/general.php
b/lib/general.php
index
6216e34
..
524be12
100644
(file)
--- a/
lib/general.php
+++ b/
lib/general.php
@@
-7,6
+7,12
@@
function passwd($login,$pass)
function check_session()
{
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()) {
if (!empty($_POST['login']) && !empty($_POST['passwd'])) {
require_once('lib/login.php');
if (check_passwd()) {