password_reset_key_expired filter-hookWP 3.7.0

old-style key is used.

Usage

add_filter( 'password_reset_key_expired', 'wp_kama_password_reset_key_expired_filter', 10, 2 );

/**
 * Function for `password_reset_key_expired` filter-hook.
 * 
 * @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 WP_Error
 */
function wp_kama_password_reset_key_expired_filter( $return, $user_id ){

	// filter...
	return $return;
}
$return(WP_Error)
A WP_Error object denoting an expired key. Return a WP_User object to validate the key.
$user_id(int)
The matched user ID.

Changelog

Since 3.7.0 Introduced.
Since 3.7.0 Previously plain-text keys were stored in the database.
Since 4.3.0 Previously key hashes were stored without an expiration time.

Where the hook is called

check_password_reset_key()
password_reset_key_expired
wp-includes/user.php 2999
return apply_filters( 'password_reset_key_expired', $return, $user_id );

Where the hook is used in WordPress

Usage not found.