* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
+ * @TODO Rewrite the code to a filter *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Some security stuff...
if (!defined('__SECURITY')) {
- die();
+ exit();
} elseif (!isMember()) {
redirectToIndexMemberOnlyModule();
}
// Base URL for redirection (both cases)
$url = 'modules.php?module=index&code=';
-if (destroyMemberSession()) {
+// Do the logout but keep session if current user is also admin
+if (destroyMemberSession(!isAdmin())) {
// Remove theme cookie as well
- if (isExtensionActive('theme')) setTheme('');
+ // @TODO Move this in a filter, e.g. member_logout
+ if (isExtensionActive('theme')) {
+ setMailerTheme('');
+ } // END - if
// Logout completed
$url .= getCode('LOGOUT_DONE');