WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2018 01:03:53 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Privacy: update and enhance the method to confirm user requests by email. Introduce WP_User_Request to hold all request vars similarly to WP_Post.

Props mikejolley, desrosj.
Merges [43011] and [43014] to the 4.9 branch.
See #43443.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/ajax-actions.php

    r43083 r43084  
    41554155
    41564156    // Find the request CPT
    4157     $request = get_post( $request_id );
    4158     if ( 'remove_personal_data' !== $request->post_title ) {
     4157    $request = wp_get_user_request_data( $request_id );
     4158
     4159    if ( ! $request || 'remove_personal_data' !== $request->action_name ) {
    41594160        wp_send_json_error( __( 'Error: Invalid request ID.' ) );
    41604161    }
    41614162
    4162     $email_address = get_post_meta( $request_id, '_wp_user_request_user_email', true );
     4163    $email_address = $request->email;
    41634164
    41644165    if ( ! is_email( $email_address ) ) {
Note: See TracChangeset for help on using the changeset viewer.