wp_check_password
wp_check_password ( $password, $hash, $user_id = '' )
Parameters:- (string) password Plaintext user's password.
- (string) hash Hash of the user's password to check against.
- (string|int) user_id Optional. User ID.
Uses:- PasswordHash::CheckPassword
Returns:- (bool) False, if the $password does not match the hashed password.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Checks a plaintext password against a hashed password.Maintains compatibility between old version and the new cookie authentication
protocol using PHPass library. The $hash parameter is the encrypted password
and the function compares the plain text password when encrypted similarly
against the already encrypted password to see if they match.
For integration with other applications, this function can be overwritten to
instead use the other package password hashing algorithm.