]> git.mxchange.org Git - mailer.git/commitdiff
Fixed: 'hash' is always a GET parameter and it is 'admin_login', not 'login' which...
authorRoland Haeder <roland@mxchange.org>
Thu, 11 Sep 2014 18:21:36 +0000 (20:21 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 11 Sep 2014 18:21:36 +0000 (20:21 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/modules/admin.php
templates/de/html/admin/admin_reset_password_form.tpl
templates/de/html/admin/admin_validate_reset_hash_form.tpl

index 1807ee960f078b3e1f691302decddf6655442831..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');
index 23fa98a4801f4c87fe6ac35326c59e9062728316..94053a63d91388452a2033bf77381107f896da10 100644 (file)
@@ -38,7 +38,7 @@
 <tr>
        <td class="table_footer" colspan="2">
                <input type="hidden" name="hash" value="$content[hash]" />
-               <input type="hidden" name="login" value="$content[admin_login]" />
+               <input type="hidden" name="admin_login" value="$content[admin_login]" />
                <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
                <input type="submit" class="form_submit" name="reset_pass" value="{--ADMIN_RESET_PASSWORD_SUBMIT--}" />
        </td>
index e75c08a14d7b63f0ef75f19bfcc3be1b278eebdf..9b5995cb4c72e0156af693c8c921f67de1e1624e 100644 (file)
@@ -12,7 +12,7 @@
                {--ADMIN_ENTER_LOGIN--}
        </td>
        <td class="bottom">
-               <input type="text" class="form_field" name="login" size="20" maxlength="255" />
+               <input type="text" class="form_field" name="admin_login" size="20" maxlength="255" />
        </td>
 </tr>