W3cubDocs

/WordPress

wp_get_user_request( int $request_id )

Return the user request object for the specified request ID.

Parameters

$request_id

(int) (Required) The ID of the user request.

Return

(WP_User_Request|false)

Source

File: wp-includes/user.php

function wp_get_user_request( $request_id ) {
	$request_id = absint( $request_id );
	$post       = get_post( $request_id );

	if ( ! $post || 'user_request' !== $post->post_type ) {
		return false;
	}

	return new WP_User_Request( $post );
}

Changelog

Version Description
4.9.6 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_user_request