diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-10-11 11:21:57 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-10-11 11:21:57 +0200 |
commit | e9621d076ac44caa609c6de79fe7f22a38f6a450 (patch) | |
tree | 12a1988bcdcf4af8ca1b09b0a4ab4ac717b89dbe /inc | |
parent | 176ae32b3f32b45a6ff8c81921aa9fbed2e28ace (diff) | |
download | rpg-e9621d076ac44caa609c6de79fe7f22a38f6a450.tar.gz rpg-e9621d076ac44caa609c6de79fe7f22a38f6a450.tar.bz2 |
reopen the session in auth_logoff FS#1484
To clean data from the session correctly on logout, the session needs
to be reopened.
darcs-hash:20081011092157-7ad00-e5cc905b6e04b13fe667690c0e6aad68524254f1.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/auth.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/auth.php b/inc/auth.php index f9d48d0d6..19c7fb174 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -281,6 +281,9 @@ function auth_logoff(){ global $INFO, $ID; global $auth; + // reopen session + @session_start(); + if(isset($_SESSION[DOKU_COOKIE]['auth']['user'])) unset($_SESSION[DOKU_COOKIE]['auth']['user']); if(isset($_SESSION[DOKU_COOKIE]['auth']['pass'])) @@ -300,6 +303,9 @@ function auth_logoff(){ if($auth && $auth->canDo('logoff')){ $auth->logOff(); } + + // close session again + session_write_close(); } /** |