check_password WordPress Filter Hook
The check_password hook is used to validate a user's password when logging in to a WordPress site. This hook is called during the login process, after the user has entered their username and password. If the password is valid, the hook will return true. If the password is invalid, the hook will return false. This hook can be used to customise the password validation process, for example, to check for password strength or to allow users to log in with alternate credentials.
apply_filters( 'check_password', bool $check , string $password , string $hash , string|int $user_id ) #
Filters whether the plaintext password matches the encrypted password.
Parameters
- $check
(bool)Whether the passwords match.
- $password
(string)The plaintext password.
- $hash
(string)The hashed password.
- $user_id
(string|int)User ID. Can be empty.
Source
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |