Filters whether the given user can be authenticated with the provided password.
Parameters
Source
$user = apply_filters( 'wp_authenticate_user', $user, $password );
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Filters whether the given user can be authenticated with the provided password.
$user = apply_filters( 'wp_authenticate_user', $user, $password );
Version | Description |
---|---|
2.5.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example Code:
With:
It will save many headaches.
A basic usage example
This hook passes two parameters, $user and $password (plaintext). In order to generate an error on login, you will need to return a new WP_Error() object.