* 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
+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;
}