X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=56085111a2a3fd4bf7a5a0c912fb73d014a5e131;hp=c0f493ff823eb197e41efa43566c637860984017;hb=f928ad2bed60fa256d0641eaf6d2c027a2944688;hpb=81bfbcd72e424060ea1223b49ad92fcfa150f361 diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index c0f493ff82..56085111a2 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__, generateExtensionInactiveNotInstalledMessage('user')); return; } @@ -53,7 +53,6 @@ global $DATA; // Initialize variables $errorCode = 0; -$probe_nickname = false; $uid = false; $hash = ''; $URL = ''; @@ -63,16 +62,16 @@ $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')))) { + if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE(REQUEST_POST('id')))) { // Nickname entered $uid = SQL_ESCAPE(REQUEST_POST('id')); } else { // Direct userid entered $uid = bigintval(REQUEST_POST('id')); } -} elseif (REQUEST_ISSET_POST(('new_pass'))) { +} elseif (REQUEST_ISSET_POST('new_pass')) { // New password requested $uid = 0; if (REQUEST_ISSET_POST('id')) $uid = REQUEST_POST('id'); @@ -82,27 +81,27 @@ 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_POST('new_pass')) REQUEST_SET_POST('new_pass', ''); +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))) { +} elseif ((REQUEST_ISSET_POST('new_pass')) && (isset($uid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) $errorCode = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid); } // 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 +145,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', '');