* Represents user request data loaded from a WP_Post object.
#[AllowDynamicProperties]
final class WP_User_Request {
public $action_name = '';
* Timestamp this request was created.
public $created_timestamp = null;
* Timestamp this request was last modified.
public $modified_timestamp = null;
* Timestamp this request was confirmed.
public $confirmed_timestamp = null;
* Timestamp this request was completed.
public $completed_timestamp = null;
* Misc data assigned to this request.
public $request_data = array();
* Key used to confirm this request.
* @since 6.8.0 The key is now hashed using wp_fast_hash() instead of phpass.
public $confirm_key = '';
* @param WP_Post|object $post Post object.
public function __construct( $post ) {
$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;