Make WordPress Core

Ticket #32508: 32508.2.diff

File 32508.2.diff, 799 bytes (added by MikeHansenMe, 10 years ago)
  • src/wp-includes/pluggable.php

     
    572572                $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
    573573        }
    574574
    575         $ignore_codes = array('empty_username', 'empty_password');
    576 
    577         if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {
     575        if ( is_wp_error( $user ) ) {
    578576                /**
    579577                 * Fires after a user login has failed.
    580578                 *
     
    582580                 *
    583581                 * @param string $username User login.
    584582                 */
    585                 do_action( 'wp_login_failed', $username );
     583                do_action( 'wp_login_failed', $username, $user->get_error_code() );
    586584        }
    587585
    588586        return $user;