check_password хук-фильтрWP 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;
}
$check(true|false)
Whether the passwords match.
$password(строка)
The plaintext password.
$hash(строка)
The hashed password.
$user_id(строка|int)
User ID. Can be empty.

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

wp_check_password()
check_password
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 );

Где используется хук в WordPress

Использование не найдено.