MyAccountTag.php
5 years ago
change-password.tmpl.php
5 years ago
dashboard.tmpl.php
5 years ago
edit-profile.tmpl.php
5 years ago
email-notifications.tmpl.php
5 years ago
index.php
5 years ago
change-password.tmpl.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined('ABSPATH')) { |
| 4 | exit; // Exit if accessed directly |
| 5 | } |
| 6 | |
| 7 | $current_user = get_user_by('id', get_current_user_id()); |
| 8 | |
| 9 | $success_message = apply_filters('ppress_password_change_confirmation_message', esc_html__('Password successfully updated.', 'wp-user-avatar')); |
| 10 | ?> |
| 11 | <div class="profilepress-myaccount-change-password"> |
| 12 | |
| 13 | <?php if (isset($_GET['edit']) && $_GET['edit'] == 'true') : ?> |
| 14 | <div class="profilepress-myaccount-alert pp-alert-success" role="alert"> |
| 15 | <?= $success_message ?> |
| 16 | </div> |
| 17 | <?php endif; ?> |
| 18 | |
| 19 | <?php if ( ! empty($this->myac_change_password_error)) : ?> |
| 20 | <div class="profilepress-myaccount-alert pp-alert-danger" role="alert"> |
| 21 | <?= $this->myac_change_password_error ?> |
| 22 | </div> |
| 23 | <?php endif; ?> |
| 24 | |
| 25 | <h2><?= esc_html__('Change Password', 'wp-user-avatar') ?></h2> |
| 26 | |
| 27 | <form method="post" id="ppmyac-form-changePassword" enctype="multipart/form-data"> |
| 28 | |
| 29 | <div class="profilepress-myaccount-form-wrap"> |
| 30 | |
| 31 | <div class="profilepress-myaccount-form-field"> |
| 32 | <label for="password_current"><?= esc_html__('Current password', 'wp-user-avatar') ?></label> |
| 33 | <input type="password" name="password_current" id="password_current" required="required" class="profilepress-myaccount-form-control"> |
| 34 | </div> |
| 35 | |
| 36 | |
| 37 | <div class="profilepress-myaccount-form-field"> |
| 38 | <label for="password_new"><?= esc_html__('New password', 'wp-user-avatar') ?></label> |
| 39 | <input type="password" name="password_new" id="password_new" required="required" class="profilepress-myaccount-form-control"> |
| 40 | </div> |
| 41 | |
| 42 | |
| 43 | <div class="profilepress-myaccount-form-field"> |
| 44 | <label for="password_confirm_new"><?= esc_html__('Confirm new password', 'wp-user-avatar') ?></label> |
| 45 | <input type="password" name="password_confirm_new" id="password_confirm_new" required="required" class="profilepress-myaccount-form-control"> |
| 46 | </div> |
| 47 | |
| 48 | |
| 49 | <div class="profilepress-myaccount-form-field"> |
| 50 | <input name="submit-form" id="submit-form" type="submit" value="<?= esc_html__('Change password', 'wp-user-avatar') ?>"> |
| 51 | </div> |
| 52 | </div> |
| 53 | |
| 54 | <input type="hidden" name="ppmyac_form_action" value="changePassword"> |
| 55 | <?= ppress_nonce_field(); ?> |
| 56 | </form> |
| 57 | |
| 58 | </div> |
| 59 | <?php |
| 60 | |
| 61 | do_action('ppress_myaccount_change_password'); |
| 62 |