X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-logout.php;h=8faf06671e74d57e85a39adc4be8fcaf046837c9;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hp=b29aa2d1a8a345bdbfbbc4c8b3cbde2a6bd30cfc;hpb=7cb246c51e8634735aaf24e546bcbc46c5ce3833;p=mailer.git diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index b29aa2d1a8..8faf06671e 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -14,11 +14,11 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * @TODO Rewrite the code to a filter * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * 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,27 +38,31 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } // Base URL for redirection (both cases) -$URL = 'modules.php?module=index&code='; +$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'); + $url .= getCode('LOGOUT_DONE'); } else { // Cannot logout! :-( - $URL .= getCode('LOGOUT_FAILED'); + $url .= getCode('LOGOUT_FAILED'); } // Load the URL -redirectToUrl($URL); +redirectToUrl($url); // [EOF] ?>