Title: WP_User_Request
Published: October 5, 2018
Last modified: August 20, 2026

---

# class WP_User_Request {}

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#description)
 * [Methods](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#methods)
 * [Source](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#changelog)

[WP_User_Request](https://developer.wordpress.org/reference/classes/wp_user_request/)
class.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#description)󠁿

Represents user request data loaded from a [WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
object.

## 󠀁[Methods](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#methods)󠁿

| Name | Description | 
| [WP_User_Request::__construct](https://developer.wordpress.org/reference/classes/wp_user_request/__construct/) | Constructor. |

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#source)󠁿

    ```php
    #[AllowDynamicProperties]
    final class WP_User_Request {
    	/**
    	 * Request ID.
    	 *
    	 * @since 4.9.6
    	 * @var int
    	 */
    	public $ID = 0;

    	/**
    	 * User ID.
    	 *
    	 * @since 4.9.6
    	 * @var string
    	 * @phpstan-var numeric-string
    	 */
    	public $user_id = '0';

    	/**
    	 * User email.
    	 *
    	 * @since 4.9.6
    	 * @var string
    	 */
    	public $email = '';

    	/**
    	 * Action name.
    	 *
    	 * @since 4.9.6
    	 * @var string
    	 */
    	public $action_name = '';

    	/**
    	 * Current status.
    	 *
    	 * @since 4.9.6
    	 * @var string
    	 */
    	public $status = '';

    	/**
    	 * Timestamp this request was created.
    	 *
    	 * @since 4.9.6
    	 * @var int|null
    	 */
    	public $created_timestamp = null;

    	/**
    	 * Timestamp this request was last modified.
    	 *
    	 * @since 4.9.6
    	 * @var int|null
    	 */
    	public $modified_timestamp = null;

    	/**
    	 * Timestamp this request was confirmed.
    	 *
    	 * @since 4.9.6
    	 * @var int|null
    	 */
    	public $confirmed_timestamp = null;

    	/**
    	 * Timestamp this request was completed.
    	 *
    	 * @since 4.9.6
    	 * @var int|null
    	 */
    	public $completed_timestamp = null;

    	/**
    	 * Misc data assigned to this request.
    	 *
    	 * @since 4.9.6
    	 * @var array
    	 */
    	public $request_data = array();

    	/**
    	 * Key used to confirm this request.
    	 *
    	 * @since 4.9.6
    	 * @since 6.8.0 The key is now hashed using wp_fast_hash() instead of phpass.
    	 *
    	 * @var string
    	 */
    	public $confirm_key = '';

    	/**
    	 * Constructor.
    	 *
    	 * @since 4.9.6
    	 *
    	 * @param WP_Post|object $post Post object.
    	 */
    	public function __construct( $post ) {
    		$this->ID                  = $post->ID;
    		$this->user_id             = $post->post_author;
    		$this->email               = $post->post_title;
    		$this->action_name         = $post->post_name;
    		$this->status              = $post->post_status;
    		$this->created_timestamp   = strtotime( $post->post_date_gmt );
    		$this->modified_timestamp  = strtotime( $post->post_modified_gmt );
    		$this->confirmed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_confirmed_timestamp', true );
    		$this->completed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_completed_timestamp', true );
    		$this->request_data        = json_decode( $post->post_content, true );
    		$this->confirm_key         = $post->post_password;
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-user-request.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-user-request.php#L9)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-user-request.php#L9-L122)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_user_request/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.9.6](https://developer.wordpress.org/reference/since/4.9.6/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_user_request%2F)
before being able to contribute a note or feedback.