From 35b470e928fa6ab8c1bef7053010535ec1a247d8 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 28 Mar 2024 15:59:50 +0200 Subject: [PATCH] - reviewed #1476; --- includes/core/um-actions-account.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/core/um-actions-account.php b/includes/core/um-actions-account.php index 878ad847..366bf0f5 100644 --- a/includes/core/um-actions-account.php +++ b/includes/core/um-actions-account.php @@ -553,7 +553,8 @@ add_action( 'um_after_user_account_updated', 'um_after_user_account_updated_perm */ function um_account_updated_notification( $user_id, $changed ) { // phpcs:disable WordPress.Security.NonceVerification - if ( 'password' !== $_POST['_um_account_tab'] || 1 !== absint( UM()->options()->get( 'changedpw_email_on' ) ) ) { + if ( 'password' !== $_POST['_um_account_tab'] || ! UM()->options()->get( 'changedpw_email_on' ) ) { + // Avoid email duplicates (account changed and password changed) on the password change tab. um_fetch_user( $user_id ); UM()->mail()->send( um_user( 'user_email' ), 'changedaccount_email' ); }