Skip to content

Commit fbe4d57

Browse files
authored
Merge pull request #878 from wpdev10/master
Allow to resend activation email from forgot password form
2 parents 387e30a + f278175 commit fbe4d57

4 files changed

Lines changed: 20 additions & 6 deletions

File tree

assets/js/users-wp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function uwp_modal_login_form_process(){
447447
}
448448

449449
}else if(data.success===false){
450-
jQuery('.uwp-auth-modal .modal-content .modal-error').html(data.data);
450+
jQuery('.uwp-auth-modal .modal-content .modal-error').html(data.data.message);
451451
jQuery('.uwp-auth-modal .modal-content .uwp_login_submit').html($button_text).prop('disabled', false);// enable submit
452452
uwp_maybe_reset_recaptcha();
453453
}

assets/js/users-wp.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-forms.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,17 +1663,25 @@ public function process_forgot() {
16631663
// make sure user account is active before account reset
16641664
$mod_value = get_user_meta( $user_data->ID, 'uwp_mod', true );
16651665
if ( $mod_value == 'email_unconfirmed' ) {
1666+
$resend_link = uwp_get_forgot_page_url();
1667+
$resend_link = add_query_arg(
1668+
array(
1669+
'user_id' => $user_data->ID,
1670+
'action' => 'uwp_resend',
1671+
'_nonce' => wp_create_nonce('uwp_resend'),
1672+
),
1673+
$resend_link
1674+
);
16661675
$message = aui()->alert(
16671676
array(
16681677
'type' => 'error',
1669-
'content' => __( 'Your account is not activated yet. Please activate your account first.', 'userswp' ),
1678+
'content' => sprintf(__('Your account is not activated yet. Please activate your account first. <a href="%s">Resend</a>.', 'userswp'), $resend_link),
16701679
)
16711680
);
16721681
if ( wp_doing_ajax() ) {
16731682
wp_send_json_error( $message );
16741683
} else {
16751684
$uwp_notices[] = array( 'forgot' => $message );
1676-
16771685
return;
16781686
}
16791687
}
@@ -4909,10 +4917,13 @@ public function ajax_forgot_password_form() {
49094917

49104918
// add the modal error container
49114919
add_action( 'uwp_template_display_notices', array( $this, 'modal_error_container' ) );
4912-
4920+
$args = array(
4921+
'form_title' => '',
4922+
'css_class' => ''
4923+
);
49134924
// get the form
49144925
ob_start();
4915-
uwp_get_template( 'bootstrap/forgot.php' );
4926+
uwp_get_template( 'bootstrap/forgot.php', $args );
49164927
$form = ob_get_clean();
49174928

49184929
// bs5

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ Yes, you can customize it with Elementor, but also with Gutenberg, Divi, Beaver
152152

153153
== Changelog ==
154154

155+
= 1.2.55 - 2026-TBD =
156+
* Allow to resend activation email from forgot password form if account is not activated - ADDED
157+
155158
= 1.2.54 - 2026-01-22 =
156159
* Max entries per csv file option in Import/Export setting not showing options - FIXED
157160
* Check nonce while profile image and cover image crop - FIXED/SECURITY

0 commit comments

Comments
 (0)