Ticket #30789: 30789.diff
File 30789.diff, 952 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/pluggable.php
561 561 $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); 562 562 } 563 563 564 $ignore_codes = array( 'empty_username', 'empty_password');564 $ignore_codes = array( 'empty_username', 'empty_password' ); 565 565 566 if ( is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {566 if ( is_wp_error( $user ) && ! in_array( $user->get_error_code(), $ignore_codes ) ) { 567 567 /** 568 568 * Fires after a user login has failed. 569 569 * 570 570 * @since 2.5.0 571 571 * 572 572 * @param string $username User login. 573 * @param string Login error. 573 574 */ 574 do_action( 'wp_login_failed', $username );575 do_action( 'wp_login_failed', $username, $user->get_error_code() ); 575 576 } 576 577 577 578 return $user;