- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-} elseif (!IS_MEMBER()) {
- $URL = 'modules.php?module=index';
- if ($check == 'mem_only') $URL .= '&msg='.getCode('MODULE_MEM_ONLY').'&mod='.$GLOBALS['module'];
- LOAD_URL($URL);
-}
-
-if ($status != 'CONFIRMED') {
- // If the status is different than confirmed move the user away from here
- $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
-
- // Load URL
- LOAD_URL('modules.php?module=index&what=login&login='.$errorCode);
+ die();
+} elseif (!isMember()) {
+ $url = 'modules.php?module=index';
+ if (checkModulePermissions('login') == 'mem_only') $url .= '&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule();
+ redirectToUrl($url);