lostpassword_post action-hookWP 2.1.0

Fires before errors are returned from a password reset request.

Usage

add_action( 'lostpassword_post', 'wp_kama_lostpassword_post_action', 10, 2 );

/**
 * Function for `lostpassword_post` action-hook.
 * 
 * @param WP_Error      $errors    A WP_Error object containing any errors generated by using invalid credentials.
 * @param WP_User|false $user_data WP_User object if found, false if the user does not exist.
 *
 * @return void
 */
function wp_kama_lostpassword_post_action( $errors, $user_data ){

	// action...
}
$errors(WP_Error)
A WP_Error object containing any errors generated by using invalid credentials.
$user_data(WP_User|false)
WP_User object if found, false if the user does not exist.

Changelog

Since 2.1.0 Introduced.
Since 4.4.0 Added the $errors parameter.
Since 5.4.0 Added the $user_data parameter.

Where the hook is called

retrieve_password()
lostpassword_post
wp-includes/user.php 3108
do_action( 'lostpassword_post', $errors, $user_data );

Where the hook is used in WordPress

Usage not found.