wp_create_user_request ( $email_address = '', $action_name = '', $request_data = array() )
- (string) $email_address User email address. This can be the address of a registered or non-registered user.
- (string) $action_name Name of the action that is being confirmed. Required.
- (array) $request_data Misc data you want to send with the verification request and pass to the actions once the request is confirmed.
- (int|WP_Error) Returns the request ID if successful, or a WP_Error object on failure.
- Introduced in WordPress: 4.9.6
- Deprecated in WordPress: —
Create and log a user request to perform a specific action.
Requests are stored inside a post type named
user_request since they can apply to both
users on the site, or guests without a user account.