check_password filter-hookWP 2.5.0

Filters whether the plaintext password matches the encrypted password.


add_filter( 'check_password', 'wp_kama_check_password_filter', 10, 4 );

 * Function for `check_password` filter-hook.
 * @param bool       $check    Whether the passwords match.
 * @param string     $password The plaintext password.
 * @param string     $hash     The hashed password.
 * @param string|int $user_id  User ID. Can be empty.
 * @return bool
function wp_kama_check_password_filter( $check, $password, $hash, $user_id ){

	// filter...
	return $check;
Whether the passwords match.
The plaintext password.
The hashed password.
User ID. Can be empty.


Since 2.5.0 Introduced.

Where the hook is called

wp-includes/pluggable.php 2594
return apply_filters( 'check_password', $check, $password, $hash, $user_id );
wp-includes/pluggable.php 2610
return apply_filters( 'check_password', $check, $password, $hash, $user_id );

Where the hook is used in WordPress

Usage not found.