Send an email when the password is changed

This commit is contained in:
yuriinalivaiko
2021-02-24 15:51:52 +02:00
parent 16bdc0cf9c
commit fc668b2744
+8 -1
View File
@@ -618,8 +618,15 @@ if ( ! class_exists( 'um\core\Password' ) ) {
if ( ( ! $errors->get_error_code() ) ) {
reset_password( $user, $args['user_password'] );
delete_user_meta( $args['user_id'], 'password_rst_attempts' );
// send the Password Changed Email
UM()->user()->password_changed();
// clear temporary data
update_user_meta( $user->ID, 'password_rst_attempts', 0 );
$this->setcookie( $rp_cookie, false );
// logout
if ( is_user_logged_in() ) {
wp_logout();
}