apply_filters( 'lostpassword_user_data', WP_User|false $user_data, WP_Error $errors )
- Since
- 5.7.0
Filters the user data during a password reset request.
Description
Allows, for example, custom validation using data other than username or email address.
Compatibility
- WordPress
- since 5.7.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
$user_dataWP_User|false- WP_User object if found, false if the user does not exist.
$errorsWP_Error- A WP_Error object containing any errors generated by using invalid credentials.
Where this hook fires · 1
wp-includes/user.php:3208retrieve_password()
Source code
* @since 5.7.0 * * @param WP_User|false $user_data WP_User object if found, false if the user does not exist. * @param WP_Error $errors A WP_Error object containing any errors generated * by using invalid credentials. */ $user_data = apply_filters( 'lostpassword_user_data', $user_data, $errors ); /** * Fires before errors are returned from a password reset request. * * @since 2.1.0 * @since 4.4.0 Added the `$errors` parameter.Changelog
Introduced in 5.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 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.