1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

fix parse error on front-end logout (when main admin in 'login as' state)

This commit is contained in:
secretr
2012-06-15 11:30:37 +00:00
parent c898921631
commit 8da6fd2ed2
2 changed files with 7 additions and 4 deletions

View File

@@ -845,15 +845,17 @@ if (($_SERVER['QUERY_STRING'] == 'logout')/* || (($pref['user_tracking'] == 'ses
// earlier event trigger with user data still available
e107::getEvent()->trigger('logout');
// first model logout and session destroy..
e107::getUser()->logout();
// it might be removed soon
if ($pref['user_tracking'] == 'session')
{
session_destroy();
$_SESSION[e_COOKIE]='';
}
cookie(e_COOKIE, '', (time() - 2592000));
e107::getUser()->logout();
e107::getRedirect()->redirect(SITEURL);
// header('location:'.e_BASE.'index.php');