X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin.php;h=b80841278321616345c4fe611cc06e0d5c5a120a;hb=150ed402878985508f10f4e06d25831e0fb3a1f8;hp=1807ee960f078b3e1f691302decddf6655442831;hpb=6b1e55213d76a67e9aa3d9f1e4dcb55e0bbf12ee;p=mailer.git diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 1807ee960f..b808412783 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -58,18 +58,15 @@ if (!isAdminRegistered()) { if ((isPostRequestElementSet('send_link')) && (isPostRequestElementSet('email'))) { // Output result displayMessage(sendAdminPasswordResetLink(postRequestElement('email'))); - } elseif (isGetRequestElementSet('hash')) { - // Output form for hash validation - loadTemplate('admin_validate_reset_hash_form', FALSE, getRequestElement('hash')); - } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('admin_login')) && (isPostRequestElementSet('hash'))) { + } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('admin_login')) && (isGetRequestElementSet('hash'))) { // Validate the login data and hash - $valid = adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('admin_login')); + $valid = adminResetValidateHashLogin(getRequestElement('hash'), postRequestElement('admin_login')); // Valid? if ($valid === TRUE) { // Prepare content first $content = array( - 'hash' => postRequestElement('hash'), + 'hash' => getRequestElement('hash'), 'admin_login' => postRequestElement('admin_login') ); @@ -88,6 +85,9 @@ if (!isAdminRegistered()) { // Validation failed displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}'); } + } elseif (isGetRequestElementSet('hash')) { + // Output form for hash validation + loadTemplate('admin_validate_reset_hash_form', FALSE, getRequestElement('hash')); } else { // Output reset password form loadTemplate('admin_reset_password_send_link');