From 843c2638816a8c79e1db25ee17e2a5aeda5c37d7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 10 May 2018 21:22:26 +0000 Subject: [PATCH] Privacy: Expose erasure notification recipient to filter callbacks. The previous `user_email` value was redundant, because it always matched `$request_data->email`. That value might be different from where the message is sent, though, if `the user_erasure_fulfillment_email_to` filter is used. If they are different, then callbacks for the `user_confirmed_action_email_content` filter may want to distinguish between the email address of the user making the request, and the email address that the confirmation notification is being sent to. Props desrosj, iandunn. Merges [43236] to the 4.9 branch. See #43973. Built from https://develop.svn.wordpress.org/branches/4.9@43237 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43066 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index b430431d0f..657769c98f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -3028,7 +3028,7 @@ function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) { $email_data = array( 'request' => $request_data, - 'user_email' => $request_data->email, + 'message_recipient' => $user_email, 'privacy_policy_url' => get_privacy_policy_url(), 'sitename' => get_option( 'blogname' ), 'siteurl' => home_url(), @@ -3083,7 +3083,9 @@ All at ###SITENAME### * Data relating to the account action email. * * @type WP_User_Request $request User request object. - * @type string $user_email The email address confirming a request. + * @type string $message_recipient The address that the email will be sent to. Defaults + * to the value of `$request->email`, but can be changed + * by the `user_erasure_fulfillment_email_to` filter. * @type string $privacy_policy_url Privacy policy URL. * @type string $sitename The site name sending the mail. * @type string $siteurl The site URL sending the mail. diff --git a/wp-includes/version.php b/wp-includes/version.php index fef200b8a2..deb65c8db7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.6-beta1-43235'; +$wp_version = '4.9.6-beta1-43237'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.