Ticket #30789: 30789.2.diff
File 30789.2.diff, 1.0 KB (added by , 9 years ago) |
---|
-
src/wp-includes/pluggable.php
534 534 $user = new WP_Error( 'authentication_failed', __( '<strong>ERROR</strong>: Invalid username, email address or incorrect password.' ) ); 535 535 } 536 536 537 $ignore_codes = array( 'empty_username', 'empty_password');537 $ignore_codes = array( 'empty_username', 'empty_password' ); 538 538 539 if ( is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {539 if ( is_wp_error( $user ) && ! in_array( $user->get_error_code(), $ignore_codes ) ) { 540 540 /** 541 541 * Fires after a user login has failed. 542 542 * … … 544 544 * @since 4.5.0 The value of `$username` can now be an email address. 545 545 * 546 546 * @param string $username Username or email address. 547 * @param strin Login error. 547 548 */ 548 do_action( 'wp_login_failed', $username );549 do_action( 'wp_login_failed', $username, $user->get_error_code() ); 549 550 } 550 551 551 552 return $user;