diff --git a/src/wp-login.php b/src/wp-login.php
index ace097d9c0..833a8f547c 100644
a
|
b
|
function wp_login_viewport_meta() { |
363 | 363 | * @return bool|WP_Error True: when finish. WP_Error on error |
364 | 364 | */ |
365 | 365 | function retrieve_password() { |
366 | | $errors = new WP_Error(); |
| 366 | $errors = new WP_Error(); |
| 367 | $user_data = false; |
367 | 368 | |
368 | 369 | if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) { |
369 | 370 | $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Enter a username or email address.' ) ); |
… |
… |
function retrieve_password() { |
380 | 381 | /** |
381 | 382 | * Fires before errors are returned from a password reset request. |
382 | 383 | * |
| 384 | * @param WP_Error $errors A WP_Error object containing any errors generated |
| 385 | * by using invalid credentials. |
| 386 | * |
| 387 | * @param WP_User|false $user_data false if user not found else WP_User object. |
| 388 | * |
383 | 389 | * @since 2.1.0 |
384 | 390 | * @since 4.4.0 Added the `$errors` parameter. |
385 | | * |
386 | | * @param WP_Error $errors A WP_Error object containing any errors generated |
387 | | * by using invalid credentials. |
388 | 391 | */ |
389 | | do_action( 'lostpassword_post', $errors ); |
| 392 | do_action( 'lostpassword_post', $errors, $user_data ); |
390 | 393 | |
391 | 394 | if ( $errors->has_errors() ) { |
392 | 395 | return $errors; |