]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-logout.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / member / what-logout.php
index 88abed7a7a62a4995131fbe7f2793d68596e0f93..8faf06671e74d57e85a39adc4be8fcaf046837c9 100644 (file)
@@ -17,8 +17,8 @@
  * @TODO Rewrite the code to a filter                                   *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2013 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 *
@@ -38,7 +38,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } elseif (!isMember()) {
        redirectToIndexMemberOnlyModule();
 }
@@ -46,10 +46,12 @@ if (!defined('__SECURITY')) {
 // 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
+       // @TODO Move this in a filter, e.g. member_logout
        if (isExtensionActive('theme')) {
-               setTheme('');
+               setMailerTheme('');
        } // END - if
 
        // Logout completed