Make WordPress Core


Ignore:
Timestamp:
04/27/2018 05:30:28 PM (7 years ago)
Author:
azaozz
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.
See #43443.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r43008 r43011  
    44644464
    44654465    // Find the request CPT
    4466     $request = get_post( $request_id );
    4467     if ( 'remove_personal_data' !== $request->post_title ) {
     4466    $request = wp_get_user_request_data( $request_id );
     4467
     4468    if ( ! $request || 'remove_personal_data' !== $request->action_name ) {
    44684469        wp_send_json_error( __( 'Error: Invalid request ID.' ) );
    44694470    }
    44704471
    4471     $email_address = get_post_meta( $request_id, '_wp_user_request_user_email', true );
     4472    $email_address = $request->email;
    44724473
    44734474    if ( ! is_email( $email_address ) ) {
Note: See TracChangeset for help on using the changeset viewer.