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 checking algorithm.
public check ( string $password, string $hash, string | integer $user_id = '' ) : boolean | ||
$password | string | Plaintext user's password |
$hash | string | Hash of the user's password to check against. |
$user_id | string | integer | Optional. User ID. |
리턴 | boolean | False, if the $password does not match the hashed password |