password_needs_rehash filter-hookWP 6.8.0

Filters whether the password hash needs to be rehashed.

Usage

add_filter( 'password_needs_rehash', 'wp_kama_password_needs_rehash_filter', 10, 3 );

/**
 * Function for `password_needs_rehash` filter-hook.
 * 
 * @param bool       $needs_rehash Whether the password hash needs to be rehashed.
 * @param string     $hash         The password hash.
 * @param string|int $user_id      Optional. ID of a user associated with the password.
 *
 * @return bool
 */
function wp_kama_password_needs_rehash_filter( $needs_rehash, $hash, $user_id ){

	// filter...
	return $needs_rehash;
}
$needs_rehash(true|false)
Whether the password hash needs to be rehashed.
$hash(string)
The password hash.
$user_id(string|int)
Optional. ID of a user associated with the password.

Changelog

Since 6.8.0 Introduced.

Where the hook is called

wp_password_needs_rehash()
password_needs_rehash
wp-includes/pluggable.php 2837
return apply_filters( 'password_needs_rehash', $needs_rehash, $hash, $user_id );

Where the hook is used in WordPress

Usage not found.