- $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=".urlencode(LANG_MEM_ONLY_1.$GLOBALS['module'].LANG_MEM_ONLY_2);
- LOAD_URL($URL);
-}
-
-if ($status != "CONFIRMED") {
- // If the status is different than confirmed move the user away from here
- $ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
-
- // Load URL
- LOAD_URL("modules.php?module=index&what=login&login=".$ERROR);
+ exit();
+} elseif (!isMember()) {
+ // Redirect to login form with displayed error code
+ redirectToUrl('modules.php?module=index&what=login&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule());