Ticket #32508: 32508.3.patch
File 32508.3.patch, 1.3 KB (added by , 9 years ago) |
---|
-
pluggable.php
592 592 $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); 593 593 } 594 594 595 $ ignore_codes = array('empty_username', 'empty_password');595 $empty_codes = array('empty_username', 'empty_password'); 596 596 597 if (is_wp_error($user) && !in_array($user->get_error_code(), $ ignore_codes) ) {597 if (is_wp_error($user) && !in_array($user->get_error_code(), $empty_codes) ) { 598 598 /** 599 599 * Fires after a user login has failed. 600 600 * … … 605 605 do_action( 'wp_login_failed', $username ); 606 606 } 607 607 608 if ( is_wp_error($user) && 'empty_username' === $user->get_error_code() ) { 609 /** 610 * Fires after a user login has failed due to an empty username. 611 * 612 * @since 4.4.0 613 * 614 * @param string $username User login. 615 */ 616 do_action( 'wp_login_failed_empty_username', $username ); 617 } 618 if ( is_wp_error($user) && 'empty_password' === $user->get_error_code() ) { 619 /** 620 * Fires after a user login has failed due to an empty password. 621 * 622 * @since 4.4.0 623 */ 624 do_action( 'wp_login_failed_empty_password' ); 625 } 626 608 627 return $user; 609 628 } 610 629 endif;