apply_filters( 'password_reset_key_expired', WP_Error $return, int $user_id )
- Since
- 3.7.0, 4.3.0
Filters the return value of check_password_reset_key() when an old-style key or an expired key is used.
Description
Prior to 3.7, plain-text keys were stored in the database.
Compatibility
- WordPress
- since 4.3.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$returnWP_Error- A WP_Error object denoting an expired key.
Return a WP_User object to validate the key. $user_idint- The matched user ID.
Where this hook fires · 1
wp-includes/user.php:3225check_password_reset_key()
Source code
* @since 4.3.0 Previously key hashes were stored without an expiration time. * * @param WP_Error $return A WP_Error object denoting an expired key. * Return a WP_User object to validate the key. * @param int $user_id The matched user ID. */ return apply_filters( 'password_reset_key_expired', $return, $user_id ); } return new WP_Error( 'invalid_key', __( 'Invalid key.' ) );} /**Changelog
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.3.0
Previously key hashes were stored without an expiration time.from the docblock
3.7.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.