do_action( 'password_reset', WP_User $user, string $new_pass )

Fires before the user’s password is reset.


$user WP_User
The user.
$new_pass string
New user password.

Top ↑

More Information

Runs after the user submits a new password during password reset but before the new password is actually set.

Top ↑


File: wp-includes/user.php. View all references

do_action( 'password_reset', $user, $new_pass );

Top ↑


Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Sayedul Sayem
    add_action('password_reset', 'password_reset_action', 10, 2);
    function password_reset_action($user, $new_pass) {
    	// user email. $user return full user info
    	$email = $user->data->user_email;
    	// new entered password (plain text)
    	$password = $new_pass;
    	// Do whatever you want...

You must log in before being able to contribute a note or feedback.