X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fregister_functions.php;h=703a2a0759745e9318f4517c0a53eb116f0b1bcf;hp=0b8f952157f535e8a1e5fea182c7d0e0a05a1aab;hb=1d22c70e65e858422ee0d17a7612f4b5c0757a42;hpb=5db6eec1f733feda6977091029680a8b12396560 diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 0b8f952157..703a2a0759 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -187,19 +187,19 @@ function isRegistrationDataComplete () { setPostRequestArray($postArray); // Are both passwords zero length? - if ((strlen(postRequestElement('pass1')) == 0) && (strlen(postRequestElement('pass2')) == 0) && ($isOkay === TRUE)) { + if ((strlen(postRequestElement('password1')) == 0) && (strlen(postRequestElement('password2')) == 0) && ($isOkay === TRUE)) { // Is the extension 'register' newer or equal 0.5.5? if ((isExtensionInstalledAndNewer('register', '0.5.5')) && (isRegisterGeneratePasswordEmptyEnabled())) { // Generate a random password $randomPassword = generatePassword(); // Set it in both entries - setPostRequestElement('pass1', $randomPassword); - setPostRequestElement('pass2', $randomPassword); + setPostRequestElement('password1', $randomPassword); + setPostRequestElement('password2', $randomPassword); } else { // Not allowed or no recent extension version - setPostRequestElement('pass1', '!'); - setPostRequestElement('pass2', '!'); + setPostRequestElement('password1', '!'); + setPostRequestElement('password2', '!'); // ... which is both not okay //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Random password generation not possible, isExtensionInstalledAndNewer(register, 0.5.5)=' . intval(isExtensionInstalledAndNewer('register', '0.5.5')) . ',isRegisterGeneratePasswordEmptyEnabled()=' . intval(isRegisterGeneratePasswordEmptyEnabled())); @@ -208,35 +208,35 @@ function isRegistrationDataComplete () { } // END - if // Did he enter his password twice? - if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { - if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { + if (((!isPostRequestElementSet('password1')) || (!isPostRequestElementSet('password2'))) || ((postRequestElement('password1') != postRequestElement('password2')) && (isPostRequestElementSet('password1')) && (isPostRequestElementSet('password2')))) { + if ((postRequestElement('password1') != postRequestElement('password2')) && (isPostRequestElementSet('password1')) && (isPostRequestElementSet('password2'))) { // Both passwords did not match - setPostRequestElement('pass1', '!'); - setPostRequestElement('pass2', '!'); + setPostRequestElement('password1', '!'); + setPostRequestElement('password2', '!'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter same passwords.'); } else { - if (!isPostRequestElementSet('pass1')) { + if (!isPostRequestElementSet('password1')) { // Password 1 is empty - setPostRequestElement('pass1', '!'); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter pass1.'); + setPostRequestElement('password1', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter password1.'); } else { // Password 2 is empty - setPostRequestElement('pass1', ''); + setPostRequestElement('password1', ''); } - if (!isPostRequestElementSet('pass2')) { + if (!isPostRequestElementSet('password2')) { // Password 2 is empty - setPostRequestElement('pass2', '!'); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter pass2.'); + setPostRequestElement('password2', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter password2.'); } else { // Password 1 is empty - setPostRequestElement('pass2', ''); + setPostRequestElement('password2', ''); } } $isOkay = FALSE; } // END - if // Is the password long enouth? - if ((strlen(postRequestElement('pass1')) < getPassLen()) && ($isOkay === TRUE)) { + if ((strlen(postRequestElement('password1')) < getPassLen()) && ($isOkay === TRUE)) { $GLOBALS['registration_short_password'] = TRUE; //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a short password.'); $isOkay = FALSE; @@ -372,7 +372,7 @@ function doUserRegistration () { bigintval(postRequestElement('day')), bigintval(postRequestElement('month')), bigintval(postRequestElement('year')), - generateHash(postRequestElement('pass1')), + generateHash(postRequestElement('password1')), bigintval(postRequestElement('max_mails')), bigintval(postRequestElement('max_mails')), convertZeroToNull(postRequestElement('refid')), @@ -457,7 +457,7 @@ function doUserRegistration () { 'zip' => bigintval(postRequestElement('zip')), 'country' => $GLOBALS['register_country_data'], 'refid' => SQL_ESCAPE(postRequestElement('refid')), - 'password' => SQL_ESCAPE(postRequestElement('pass1')), + 'password' => SQL_ESCAPE(postRequestElement('password1')), ); } else { // No ZIP code entered @@ -473,7 +473,7 @@ function doUserRegistration () { 'zip' => '', 'country' => $GLOBALS['register_country_data'], 'refid' => SQL_ESCAPE(postRequestElement('refid')), - 'password' => SQL_ESCAPE(postRequestElement('pass1')), + 'password' => SQL_ESCAPE(postRequestElement('password1')), ); }