X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=9da2af3220a3ae6905880c4ec11b5917fc7d5e9d;hp=69e77cdb883ac2533cb366d51efd804c4963ef2c;hb=ccc4a69ce9b17aa8d7b1554a3b2b017db091821b;hpb=2f0357c7ac9da6c17d361b8e7cb0b1ad09eb85f6 diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 69e77cdb88..9da2af3220 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } elseif ((!EXT_IS_ACTIVE('user')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user')); + addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveMessage('user')); return; } @@ -63,7 +63,7 @@ $add = ''; if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $uid = getUserId(); -} elseif ((REQUEST_ISSET_POST(('id'))) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) { +} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST(('password'))) && (isFormSent())) { // Set userid and crypt password when login data was submitted if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) { // Nickname entered @@ -75,7 +75,7 @@ if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { } elseif (REQUEST_ISSET_POST(('new_pass'))) { // New password requested $uid = 0; - if (REQUEST_ISSET_POST(('id'))) $uid = REQUEST_POST('id'); + if (REQUEST_ISSET_POST('id')) $uid = REQUEST_POST('id'); } else { // Not logged in $uid = 0; $hash = ''; @@ -83,15 +83,15 @@ if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { // Set unset variables if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', ''); -if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , ''); +if (!REQUEST_ISSET_GET('login')) REQUEST_SET_GET('login' , ''); if (IS_MEMBER()) { // Login immidiately... $URL = 'modules.php?module=login'; -} elseif ((IS_FORM_SENT()) && (''.$uid.'' != ''.REQUEST_POST('id').'')) { +} elseif ((isFormSent()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); -} elseif (IS_FORM_SENT()) { +} elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password')); } elseif ((REQUEST_ISSET_POST(('new_pass'))) && (isset($uid))) { @@ -100,9 +100,9 @@ if (IS_MEMBER()) { } // Login problems? -if (REQUEST_ISSET_GET(('login'))) { +if (REQUEST_ISSET_GET('login')) { // Use code from URL - $errorCode = REQUEST_GET(('login')); + $errorCode = REQUEST_GET('login'); } // END - if // Login problems? @@ -146,12 +146,12 @@ if (!empty($errorCode)) { DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode)); $message .= getMessage('LOGIN_WRONG_ID'); break; - } - $message .= " + } + $message .= "   \n"; - define('LOGIN_FAILURE_MSG', $message); + define('LOGIN_FAILURE_MSG', $message); } else { // No problems, no output define('LOGIN_FAILURE_MSG', ''); @@ -169,10 +169,10 @@ if (!empty($URL)) { // URL was constructed if (getTotalFatalErrors()) { // Fatal errors! - LOAD_INC_ONCE('inc/fatal_errors.php'); + loadIncludeOnce('inc/fatal_errors.php'); } else { // Load URL - LOAD_URL($URL); + redirectToUrl($URL); } } // END - if