mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-18 14:21:25 +01:00
Login and Registration: Introduce the lostpassword_user_data
filter which allows for the user data object during a password reset request to be filtered.
Props marcelo2605 Fixes #51924 Built from https://develop.svn.wordpress.org/trunk@49945 git-svn-id: http://core.svn.wordpress.org/trunk@49644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc5b34672c
commit
4fb7dc8429
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.7-alpha-49944';
|
$wp_version = '5.7-alpha-49945';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
13
wp-login.php
13
wp-login.php
@ -369,6 +369,19 @@ function retrieve_password() {
|
|||||||
$user_data = get_user_by( 'login', $login );
|
$user_data = get_user_by( 'login', $login );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the user data during a password reset request.
|
||||||
|
*
|
||||||
|
* Allows, for example, custom validation using data other than username or email address.
|
||||||
|
*
|
||||||
|
* @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.
|
* Fires before errors are returned from a password reset request.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user