W3cubDocs

/WordPress

do_action( ‘wp_login_failed’, string $username, WP_Error $error )

Fires after a user login has failed.

Parameters

$usernamestring
Username or email address.
$errorWP_Error
A WP_Error object with the authentication failure details.

Source

do_action( 'wp_login_failed', $username, $error );

Changelog

Version Description
5.4.0 The $error parameter was added.
4.5.0 The value of $username can now be an email address.
2.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_login_failed