- $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);
+ 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());