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:

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.

Related Functions

wp_set_password, wp_hash_password, wp_generate_password, wp_get_password_hint, check_password_reset_key

Top Google Results

User discussions

wpseek mobile