Skip to content

Commit 11d594e

Browse files
committed
Privacy: update the method to confirm user requests by email. Use a single CPT to store the requests and to allow logging/audit trail.
Props mikejolley. See #43443. git-svn-id: https://develop.svn.wordpress.org/trunk@43008 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0907ed4 commit 11d594e

7 files changed

Lines changed: 345 additions & 379 deletions

File tree

src/wp-admin/includes/admin-filters.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
add_action( 'admin_head', '_ipad_meta' );
4747

4848
// Privacy tools
49-
add_action( 'account_action_failed', '_wp_privacy_account_request_failed' );
5049
add_action( 'admin_menu', '_wp_privacy_hook_requests_page' );
5150

5251
// Prerendering.

src/wp-admin/includes/ajax-actions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4464,11 +4464,11 @@ function wp_ajax_wp_privacy_erase_personal_data() {
44644464

44654465
// Find the request CPT
44664466
$request = get_post( $request_id );
4467-
if ( 'user_remove_request' !== $request->post_type ) {
4467+
if ( 'remove_personal_data' !== $request->post_title ) {
44684468
wp_send_json_error( __( 'Error: Invalid request ID.' ) );
44694469
}
44704470

4471-
$email_address = get_post_meta( $request_id, '_user_email', true );
4471+
$email_address = get_post_meta( $request_id, '_wp_user_request_user_email', true );
44724472

44734473
if ( ! is_email( $email_address ) ) {
44744474
wp_send_json_error( __( 'Error: Invalid email address in request.' ) );

0 commit comments

Comments
 (0)