]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin.php
Typo fixed.
[mailer.git] / inc / modules / admin.php
index bab348470530e81001d8a58872654c05564371f3..b80841278321616345c4fe611cc06e0d5c5a120a 100644 (file)
@@ -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');
@@ -136,7 +136,7 @@ if (!isAdminRegistered()) {
                                break;
 
                        default: // Others will be logged
-                               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminLoginDataIsValid()", $ret));
+                               logDebugMessage(__FILE__, __LINE__, sprintf('Unknown return code %s from ifAdminLoginDataIsValid()', $ret));
                                break;
                } // END - switch
        } // END - if
@@ -199,7 +199,7 @@ if (!isAdminRegistered()) {
                        $register = getRequestElement('setup');
 
                        // Special logout redirect for installation of given extension
-                       loadTemplate(sprintf("admin_logout_%s_install", $register));
+                       loadTemplate(sprintf('admin_logout_%s_install', $register));
                } elseif (isGetRequestElementSet('remove')) {
                        // Secure input
                        $remove = getRequestElement('remove');