Fix for if session has expired and user is still in login area
[mailer.git] / inc / modules / login.php
index 40327c98b7954698ddb3b75fad11ab03034d97af..06c4ffb97b7eef26451804c53eada28a86c7020b 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        $URL = 'modules.php?module=index';
-       if ($check == 'mem_only') $URL .= '&msg='.getCode('MODULE_MEM_ONLY') . '&mod='.getModule();
+       if (checkModulePermissions('login') == 'mem_only') $URL .= '&msg='.getCode('MODULE_MEM_ONLY') . '&mod='.getModule();
        redirectToUrl($URL);
 }