apply_filters( 'password_needs_rehash', bool $needs_rehash, string $hash, string|int $user_id )
- Since
- 6.8.0
Filters whether the password hash needs to be rehashed.
Compatibility
- WordPress
- since 6.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 4 of the 5 tracked releases, added in 6.8.0.
Parameters
$needs_rehashbool- Whether the password hash needs to be rehashed.
$hashstring- The password hash.
$user_idstring|int- ID of a user associated with the password.
Where this hook fires · 1
wp-includes/pluggable.php:2944wp_password_needs_rehash()
Source code
* @since 6.8.0 * * @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 apply_filters( 'password_needs_rehash', $needs_rehash, $hash, $user_id ); }endif; if ( ! function_exists( 'wp_generate_password' ) ) : /** * Generates a random password drawn from the defined set of characters.Changelog
Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.