X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-login.php;h=e888b2cbbb076e89571c46c7ea2043a801b36b43;hb=19b197c32c96ce8eea26561fb7b40e87c57716ae;hp=2233e0c499e8017bf3b5cf23f5323bde8e205c9f;hpb=452578b5bf17d14099ee44956deb4e4dc0832874;p=mailer.git diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 2233e0c499..e888b2cbbb 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -1,7 +1,7 @@ 0)) $userid = bigintval(postRequestParameter('id')); } else { // Not logged in - $uid = 0; $hash = ""; + $userid = '0'; $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 (IS_MEMBER()) { +if (isMember()) { // Login immidiately... - $URL = "modules.php?module=login"; -} elseif ((IS_FORM_SENT()) && ("".$uid."" != "".REQUEST_POST('id')."")) { + $url = 'modules.php?module=login'; +} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestParameter('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) - $ERROR = getCode('EXTENSION_PROBLEM'); -} elseif (IS_FORM_SENT()) { + $errorCode = getCode('EXTENSION_PROBLEM'); +} 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))) { + $url = doUserLogin(postRequestParameter('id'), postRequestParameter('password')); +} elseif ((isPostRequestParameterSet('new_pass')) && (isset($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $ERROR = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid); + $errorCode = doNewUserPassword(postRequestParameter('email'), $userid); } // Login problems? -if (REQUEST_ISSET_GET(('login'))) { +if (isGetRequestParameterSet('login')) { // Use code from URL - $ERROR = REQUEST_GET(('login')); + $errorCode = getRequestParameter('login'); } // END - if -// Login problems? -if (!empty($ERROR)) { - // Ok, which one now? - $MSG = "