wppaste
WordPress

do_action( 'lostpassword_post', WP_Error $errors, WP_User|false $user_data )

Since
2.1.0, 4.4.0, 5.4.0
Fires before errors are returned from a password reset request.

Compatibility

WordPress
since 5.4.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$errorsWP_Error
A WP_Error object containing any errors generated by using invalid credentials.
$user_dataWP_User|false
WP_User object if found, false if the user does not exist.

Where this hook fires · 1

  • wp-includes/user.php:3313retrieve_password()

Source code

	 * @since 5.4.0 Added the `$user_data` parameter.	 *	 * @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.	 */	do_action( 'lostpassword_post', $errors, $user_data ); 	/**	 * Filters the errors encountered on a password reset request.	 *	 * The filtered WP_Error object may, for example, contain errors for an invalid	 * username or email address. A WP_Error object should always be returned,

Changelog

Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

5.4.0
Added the $user_data parameter.from the docblock
4.4.0
Added the $errors parameter.from the docblock
2.1.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.