wp-includes/user.php:4983Validates a user request by comparing the key with the request's key.
$request_idstring$keystringtrue|WP_ErrorOne hook fires while wp_validate_user_request_key() runs, in this order:
Filters the expiration time of confirm keys.
function wp_validate_user_request_key( $request_id, #[\SensitiveParameter] $key) { $request_id = absint( $request_id ); $request = wp_get_user_request( $request_id ); $saved_key = $request->confirm_key; $key_request_time = $request->modified_timestamp; if ( ! $request || ! $saved_key || ! $key_request_time ) { return new WP_Error( 'invalid_request', __( 'Invalid personal data request.' ) ); } if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) { return new WP_Error( 'expired_request', __( 'This personal data request has expired.' ) ); } if ( empty( $key ) ) { return new WP_Error( 'missing_key', __( 'The confirmation key is missing from this personal data request.' ) ); } /** * Filters the expiration time of confirm keys. * * @since 4.9.6 * * @param int $expiration The expiration time in seconds. */ $expiration_duration = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS ); $expiration_time = $key_request_time + $expiration_duration; if ( ! wp_verify_fast_hash( $key, $saved_key ) ) { return new WP_Error( 'invalid_key', __( 'The confirmation key is invalid for this personal data request.' ) ); } if ( ! $expiration_time || time() > $expiration_time ) { return new WP_Error( 'expired_key', __( 'The confirmation key has expired for this personal data request.' ) ); } return true;}Introduced in 4.9.6. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$request_id retyped from string to int.verified against sourcesrc/wp-includes/user.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.