* enhancements related to #1599;

This commit is contained in:
Mykyta Synelnikov
2024-12-19 17:24:52 +02:00
parent a6904639f3
commit a0892e18aa
4 changed files with 635 additions and 607 deletions
+10 -6
View File
@@ -123,7 +123,7 @@ class Site_Health {
'title' => get_the_title( $form_id ),
'link' => get_edit_post_link( $form_id ),
);
$forms_count++;
++$forms_count;
continue 2;
}
}
@@ -652,23 +652,27 @@ class Site_Health {
'value' => UM()->options()->get( 'reset_password_limit_number' ),
);
}
$access_other_settings['um-change_password_request_limit'] = array(
$access_other_settings['um-change_password_request_limit'] = array(
'label' => __( 'Change Password request limit ', 'ultimate-member' ),
'value' => UM()->options()->get( 'change_password_request_limit' ),
);
$access_other_settings['um-blocked_emails'] = array(
$access_other_settings['um-only_approved_user_reset_password'] = array(
'label' => __( 'Only approved user Reset Password', 'ultimate-member' ),
'value' => UM()->options()->get( 'only_approved_user_reset_password' ),
);
$access_other_settings['um-blocked_emails'] = array(
'label' => __( 'Blocked Email Addresses', 'ultimate-member' ),
'value' => stripslashes( $blocked_emails ),
);
$access_other_settings['um-blocked_words'] = array(
$access_other_settings['um-blocked_words'] = array(
'label' => __( 'Blacklist Words', 'ultimate-member' ),
'value' => stripslashes( $blocked_words ),
);
$access_other_settings['um-allowed_choice_callbacks'] = array(
$access_other_settings['um-allowed_choice_callbacks'] = array(
'label' => __( 'Allowed Choice Callbacks', 'ultimate-member' ),
'value' => stripslashes( $allowed_callbacks ),
);
$access_other_settings['um-allow_url_redirect_confirm'] = array(
$access_other_settings['um-allow_url_redirect_confirm'] = array(
'label' => __( 'Allow external link redirect confirm ', 'ultimate-member' ),
'value' => UM()->options()->get( 'allow_url_redirect_confirm' ) ? $labels['yes'] : $labels['no'],
);
File diff suppressed because it is too large Load Diff
+1
View File
@@ -691,6 +691,7 @@ if ( ! class_exists( 'um\Config' ) ) {
'enable_reset_password_limit' => true,
'reset_password_limit_number' => 3,
'change_password_request_limit' => false,
'only_approved_user_reset_password' => true,
'blocked_emails' => '',
'blocked_words' => 'admin' . "\r\n" . 'administrator' . "\r\n" . 'webmaster' . "\r\n" . 'support' . "\r\n" . 'staff',
'allowed_choice_callbacks' => '',
+5 -2
View File
@@ -454,10 +454,13 @@ if ( ! class_exists( 'um\core\Password' ) ) {
if ( isset( $data ) && is_a( $data, '\WP_User' ) ) {
um_fetch_user( $data->ID );
UM()->user()->password_reset();
if ( false === UM()->options()->get( 'only_approved_user_reset_password' ) || UM()->common()->users()->has_status( $data->ID, 'approved' ) ) {
UM()->user()->password_reset();
}
}
wp_redirect( um_get_core_page('password-reset', 'checkemail' ) );
wp_safe_redirect( um_get_core_page( 'password-reset', 'checkemail' ) );
exit;
}