allow_password_reset хук-фильтрWP 2.7.0

Filters whether to allow a password to be reset.

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

add_filter( 'allow_password_reset', 'wp_kama_allow_password_reset_filter', 10, 2 );

/**
 * Function for `allow_password_reset` filter-hook.
 * 
 * @param bool $allow   Whether to allow the password to be reset.
 * @param int  $user_id The ID of the user attempting to reset a password.
 *
 * @return bool
 */
function wp_kama_allow_password_reset_filter( $allow, $user_id ){

	// filter...
	return $allow;
}
$allow(true|false)
Whether to allow the password to be reset.
По умолчанию: true
$user_id(int)
The ID of the user attempting to reset a password.

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

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

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

wp_is_password_reset_allowed_for_user()
allow_password_reset
wp-includes/user.php 5083
return apply_filters( 'allow_password_reset', $allow, $user->ID );

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

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