From dfdf9901beb7f96f60157c8c4e3c579436f83067 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Tue, 6 Jun 2017 13:26:11 +0800 Subject: [PATCH] Fix change password email notification --- core/um-actions-account.php | 6 ++++-- core/um-actions-password.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/um-actions-account.php b/core/um-actions-account.php index 2f933b5b..9764abb1 100644 --- a/core/um-actions-account.php +++ b/core/um-actions-account.php @@ -8,11 +8,13 @@ global $ultimatemember; $tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general'; - + if ( $_POST['user_password'] && $_POST['confirm_user_password'] ) { $changes['user_pass'] = $_POST['user_password']; + + $args['id'] = um_user('ID'); - add_filter('send_password_change_email','um_send_password_change_email'); + do_action('send_password_change_email', $args ); wp_set_password( $changes['user_pass'], um_user('ID') ); diff --git a/core/um-actions-password.php b/core/um-actions-password.php index e37107d5..b69bb2fe 100644 --- a/core/um-actions-password.php +++ b/core/um-actions-password.php @@ -63,6 +63,7 @@ * Overrides password changed notification * */ + add_action('send_password_change_email','um_send_password_change_email'); function um_send_password_change_email( $args ){ global $ultimatemember;