allow_password_reset filter-hookWP 2.7.0

Filters whether to allow a password to be reset.

Usage

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.
Default: true
$user_id(int)
The ID of the user attempting to reset a password.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

get_password_reset_key()
allow_password_reset
wp-includes/user.php 2884
$allow = apply_filters( 'allow_password_reset', $allow, $user->ID );

Where the hook is used in WordPress

Usage not found.