wp_create_user_request


wp_create_user_request ( $email_address = '', $action_name = '', $request_data = array(), $status = 'pending' )

Parameters:
  • (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.
  • (string) status Optional request status (pending or confirmed). Default 'pending'.
Returns:
  • (int|WP_Error) Returns the request ID if successful, or a WP_Error object on failure.
Defined at:
Change Log:
  • 5: .

Description

Creates and logs 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.

Related Functions

wp_get_user_request, wp_send_user_request, wp_generate_user_request_key, wp_create_user, wp_get_user_request_data

Top Google Results

User discussions

wpseek mobile