WordPress.org

Make WordPress Core

Changeset 46749


Ignore:
Timestamp:
11/19/2019 09:59:19 AM (14 months ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Pass $user_data parameter to the lostpassword_post action in retrieve_password().

Props wpgurudev, pagewidth, lukecavanagh, johnbillion, kkarpieszuk.
Fixes #38334.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r46685 r46749  
    364364 */
    365365function retrieve_password() {
    366     $errors = new WP_Error();
     366    $errors    = new WP_Error();
     367    $user_data = false;
    367368
    368369    if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
     
    383384     * @since 2.1.0
    384385     * @since 4.4.0 Added the `$errors` parameter.
     386     * @since 5.4.0 Added the `$user_data` parameter.
    385387     *
    386388     * @param WP_Error $errors A WP_Error object containing any errors generated
    387389     *                         by using invalid credentials.
     390     * @param WP_User|false    WP_User object if found, false if the user does not exist.
    388391     */
    389     do_action( 'lostpassword_post', $errors );
     392    do_action( 'lostpassword_post', $errors, $user_data );
    390393
    391394    if ( $errors->has_errors() ) {
Note: See TracChangeset for help on using the changeset viewer.