X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Flogin.php;h=229c0747c6a46c2fcbb86f9fab4884853dd59875;hb=0226aea588ae0b433e4c2c17b23f79885c2d0da5;hp=971a7c03098e57c2adda354e8dfb94ff8226004e;hpb=232244ea5dea24b4b7dd4f49c671b679a8cb7c85;p=mailer.git diff --git a/inc/modules/login.php b/inc/modules/login.php index 971a7c0309..229c0747c6 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -36,36 +36,17 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - $URL = URL."/modules.php?module=index"; - if ($check == "mem_only") $URL .= "&msg=".urlencode(LANG_MEM_ONLY_1.$GLOBALS['module'].LANG_MEM_ONLY_2); + $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 - switch ($status) - { - case "LOCKED": - $ERROR = CODE_ID_LOCKED; - break; - - case "UNCONFIRMED": - $ERROR = CODE_ID_UNCONFIRMED; - break; - - default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $status)); - $ERROR = CODE_UNKNOWN_STATUS; - break; - } - $URL = URL."/modules.php?module=index&login=".$ERROR; - LOAD_URL($URL); -} // END - if + $ERROR = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status); -// Recheck if he got logged out because bad cookies -if (!IS_MEMBER()) { - $URL = URL."/modules.php?module=index"; - LOAD_URL($URL); + // Load URL + LOAD_URL("modules.php?module=index&what=login&login=".$ERROR); } // END - if // Load adverstising template @@ -78,8 +59,8 @@ $BLOCK_MODE = false; LOAD_TEMPLATE("member_header"); // Begin menu block here -OUTPUT_HTML("