diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 0c6a34e55e..4b4e0e0dc8 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -433,11 +433,15 @@ function wp_authenticate($username, $password) {
$user = get_userdatabylogin($username);
- if ( !$user || ($user->user_login != $username) )
+ if ( !$user || ($user->user_login != $username) ) {
+ do_action( 'wp_login_failed', $username );
return new WP_Error('invalid_username', __('ERROR: Invalid username.'));
+ }
- if ( !wp_check_password($password, $user->user_pass) )
+ if ( !wp_check_password($password, $user->user_pass) ) {
+ do_action( 'wp_login_failed', $username );
return new WP_Error('incorrect_password', __('ERROR: Incorrect password.'));
+ }
// If using old md5 password, rehash.
if ( strlen($user->user_pass) <= 32 )