From b5c8df2015ef337536ad34725d709e717fc1a831 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 18 Jul 2009 12:16:38 +0000 Subject: [PATCH] "Fix for bug #1992 from Hans-Juergen Tappe: The sitemgr login module does not cleanup session." --- login.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/login.php b/login.php index 2e8c93a1e8..71f65ae106 100755 --- a/login.php +++ b/login.php @@ -34,6 +34,19 @@ else exit; } +/* + * Destroy any existing anonymous session. + * Copied from logout.php. Maybe make it a common function? + */ +if(isset($GLOBALS['sitemgr_info']) && $GLOBALS['egw_info']['user']['userid'] == $GLOBALS['sitemgr_info']['anonymous_user']) +{ + if($GLOBALS['egw']->session->verify()) + { + $GLOBALS['egw']->hooks->process('logout'); + $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); + } +} + // CAS : if($GLOBALS['egw_info']['server']['auth_type'] == 'cas') {