wp-includes/user.php:5260Checks if password reset is allowed for a specific user.
$userint|WP_Userbool|WP_ErrorOne hook fires while wp_is_password_reset_allowed_for_user() runs, in this order:
Filters whether to allow a password to be reset.
function wp_is_password_reset_allowed_for_user( $user ) { if ( ! is_object( $user ) ) { $user = get_userdata( $user ); } if ( ! $user || ! $user->exists() ) { return false; } $allow = true; if ( is_multisite() && is_user_spammy( $user ) ) { $allow = false; } /** * Filters whether to allow a password to be reset. * * @since 2.7.0 * * @param bool $allow Whether to allow the password to be reset. Default true. * @param int $user_id The ID of the user attempting to reset a password. */ return apply_filters( 'allow_password_reset', $allow, $user->ID );}Introduced in 6.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/user.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.