From 647791e59851d4af33cd06875e84ca7ea90f7d91 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 10 Mar 2010 19:36:23 +0100 Subject: [PATCH] LSsession / logout : fixed bug --- .../includes/class/class.LSsession.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 3a64b4b6..ab09efa8 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -499,23 +499,6 @@ class LSsession { self :: $tmp_file = $_SESSION['LSsession']['tmp_file']; self :: $authParams = $_SESSION['LSsession']['authParams']; - if (isset($_GET['LSsession_logout'])) { - $authObj = self :: getLSauthObject(); - if ($authObj) { - $authObj -> logout(); - } - session_destroy(); - - if (is_array($_SESSION['LSsession']['tmp_file'])) { - self :: $tmp_file = $_SESSION['LSsession']['tmp_file']; - } - self :: deleteTmpFile(); - unset($_SESSION['LSsession']); - - self :: redirect('index.php'); - return; - } - if ( self :: cacheLSprofiles() && !isset($_REQUEST['LSsession_refresh']) ) { self :: setLdapServer(self :: $ldapServerId); self :: $LSprofiles = $_SESSION['LSsession']['LSprofiles']; @@ -538,6 +521,23 @@ class LSsession { return; } + if (isset($_GET['LSsession_logout'])) { + $authObj = self :: getLSauthObject(); + if ($authObj) { + $authObj -> logout(); + } + session_destroy(); + + if (is_array($_SESSION['LSsession']['tmp_file'])) { + self :: $tmp_file = $_SESSION['LSsession']['tmp_file']; + } + self :: deleteTmpFile(); + unset($_SESSION['LSsession']); + + self :: redirect('index.php'); + return; + } + self :: getLSuserObject(); if ( !self :: cacheLSprofiles() || isset($_REQUEST['LSsession_refresh']) ) {