// 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')) {
setMailerTheme('');
} // END - if