From 75a74c39389c2240d876f9e2a70b2bd8582ba69c Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Fri, 20 Sep 2024 18:17:39 +0300 Subject: [PATCH 1/3] - update for UM core 2.8.7; --- src/um-cronjob-activation-email/src/Core.php | 2 +- src/um-set-password/src/Core.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/um-cronjob-activation-email/src/Core.php b/src/um-cronjob-activation-email/src/Core.php index 05c7d26..6a2152f 100644 --- a/src/um-cronjob-activation-email/src/Core.php +++ b/src/um-cronjob-activation-email/src/Core.php @@ -53,7 +53,7 @@ public function resend_activation_notify() { $status = um_user( 'account_status' ); if ( 'awaiting_email_confirmation' === $status ) { - UM()->user()->email_pending(); + UM()->common()->users()->send_activation( $user_id ); um_reset_user(); } } diff --git a/src/um-set-password/src/Core.php b/src/um-set-password/src/Core.php index 67ae246..e47ec59 100644 --- a/src/um-set-password/src/Core.php +++ b/src/um-set-password/src/Core.php @@ -93,7 +93,7 @@ function ( $translated_text, $untranslated_text, $domain ) { public function password_has_changed( $user_id ) { if ( isset( $_REQUEST['set_pass'] ) && 'new_user' === sanitize_key( $_REQUEST['set_pass'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended um_fetch_user( $user_id ); - UM()->user()->approve( false ); + UM()->common()->users()->approve( $user_id ); } wp_safe_redirect( um_get_core_page( 'login', 'password_set' ) ); exit; From 00394cd8a9ed0a05bbd62d78811ced37703b0e5b Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Fri, 27 Sep 2024 15:41:02 +0300 Subject: [PATCH 2/3] * added force attribute to change user status actions for ignore current user condition in some cases; --- src/um-cronjob-activation-email/src/Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/um-cronjob-activation-email/src/Core.php b/src/um-cronjob-activation-email/src/Core.php index 6a2152f..d0d9765 100644 --- a/src/um-cronjob-activation-email/src/Core.php +++ b/src/um-cronjob-activation-email/src/Core.php @@ -53,7 +53,7 @@ public function resend_activation_notify() { $status = um_user( 'account_status' ); if ( 'awaiting_email_confirmation' === $status ) { - UM()->common()->users()->send_activation( $user_id ); + UM()->common()->users()->send_activation( $user_id, true ); um_reset_user(); } } From 5d941658d70ab1c878a2274b44b0ba9514a17bfe Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Fri, 27 Sep 2024 17:59:32 +0300 Subject: [PATCH 3/3] * update for 2.8.7 --- src/um-set-password/src/Core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/um-set-password/src/Core.php b/src/um-set-password/src/Core.php index e47ec59..4c93308 100644 --- a/src/um-set-password/src/Core.php +++ b/src/um-set-password/src/Core.php @@ -93,7 +93,7 @@ function ( $translated_text, $untranslated_text, $domain ) { public function password_has_changed( $user_id ) { if ( isset( $_REQUEST['set_pass'] ) && 'new_user' === sanitize_key( $_REQUEST['set_pass'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended um_fetch_user( $user_id ); - UM()->common()->users()->approve( $user_id ); + UM()->common()->users()->approve( $user_id, true ); } wp_safe_redirect( um_get_core_page( 'login', 'password_set' ) ); exit;