WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/password reset

Description

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

Usage

<?php

    add_action( 'password_reset', 'my_password_reset', 10, 2 );

    function my_password_reset( $user, $new_pass ) {
        // Do something before password reset.
    }
?>

Parameters

$user
(object) (optional) The WP_User object of the user whose password is being reset.
Default: None
$new_pass
(string) (optional) The plaintext of the new password.
Default: None
This page is marked as incomplete. You can help Codex by expanding it.