wp_check_password


wp_check_password ( $password, $hash, $user_id = '' )

Parameters:
  • (string) password Plaintext password.
  • (string) hash Hash of the password to check against.
  • (string|int) user_id Optional. ID of a user associated with the password.
Returns:
  • (bool) False, if the $password does not match the hashed password.
Defined at:
Change Log:
  • 6: .

Description

Checks a plaintext password against a hashed password.Note that this function may be used to check a value that is not a user password. A plugin may use this function to check a password of a different type, and there may not always be a user ID associated with the password. 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