Title: allow_password_reset
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘allow_password_reset’, bool $allow, int $user_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#wp--skip-link--target)

Filters whether to allow a password to be reset.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#parameters)󠁿

 `$allow`bool

Whether to allow the password to be reset. Default true.

`$user_id`int

The ID of the user attempting to reset a password.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'allow_password_reset', $allow, $user->ID );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/user.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/user.php#L5271)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/user.php#L5271-L5271)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_is_password_reset_allowed_for_user()](https://developer.wordpress.org/reference/functions/wp_is_password_reset_allowed_for_user/)`wp-includes/user.php` |

Checks if password reset is allowed for a specific user.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#comment-content-994)
 2.    [Edi](https://profiles.wordpress.org/psychosopher/)  [  10 years ago  ](https://developer.wordpress.org/reference/hooks/allow_password_reset/#comment-994)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%23comment-994)
     Vote results for this note: -1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%23comment-994)
 4.  Source file is now wp-includes/user.php.
 5.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%3Freplytocom%3D994%23feedback-editor-994)
 6.   [Skip to note 4 content](https://developer.wordpress.org/reference/hooks/allow_password_reset/?output_format=md#comment-content-3655)
 7.    [Jose Lazo](https://profiles.wordpress.org/jose-lazo/)  [  6 years ago  ](https://developer.wordpress.org/reference/hooks/allow_password_reset/#comment-3655)
 8.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%23comment-3655)
     Vote results for this note: -2[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%23comment-3655)
 9.      ```php
         $allow = apply_filters('allow_password_reset', true, $user_data->ID);
     
         if (!$allow) {
         	return false;
         } else if (is_wp_error($allow)) {
         	return false;
         }
         ```
     
 10.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F%3Freplytocom%3D3655%23feedback-editor-3655)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fallow_password_reset%2F)
before being able to contribute a note or feedback.