password_needs_rehash
Filters whether the password hash needs to be rehashed.
Использование
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(строка)
- The password hash.
- $user_id(строка|int)
- Optional. ID of a user associated with the password.
Список изменений
| С версии 6.8.0 | Введена. |
Где вызывается хук
wp-includes/pluggable.php 2940
return apply_filters( 'password_needs_rehash', $needs_rehash, $hash, $user_id );