Merge pull request #761 from ultimatemember/feature/changedpw_email

Missing Password Changed confirmation email notification after reseting password via password reset page.
This commit is contained in:
Nikita Sinelnikov
2021-03-03 17:48:15 +02:00
committed by GitHub
+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();
}