LSsession / logout : fixed bug

This commit is contained in:
Benjamin Renard 2010-03-10 19:36:23 +01:00
parent b4758b2dec
commit 647791e598

View file

@ -499,23 +499,6 @@ class LSsession {
self :: $tmp_file = $_SESSION['LSsession']['tmp_file']; self :: $tmp_file = $_SESSION['LSsession']['tmp_file'];
self :: $authParams = $_SESSION['LSsession']['authParams']; 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']) ) { if ( self :: cacheLSprofiles() && !isset($_REQUEST['LSsession_refresh']) ) {
self :: setLdapServer(self :: $ldapServerId); self :: setLdapServer(self :: $ldapServerId);
self :: $LSprofiles = $_SESSION['LSsession']['LSprofiles']; self :: $LSprofiles = $_SESSION['LSsession']['LSprofiles'];
@ -538,6 +521,23 @@ class LSsession {
return; 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(); self :: getLSuserObject();
if ( !self :: cacheLSprofiles() || isset($_REQUEST['LSsession_refresh']) ) { if ( !self :: cacheLSprofiles() || isset($_REQUEST['LSsession_refresh']) ) {