wppaste
WordPress

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.

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:3185check_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 4.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 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
Previously plain-text keys were stored in the database.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 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.