From 70fd932c258a3ac32f1d5d0a4d2f4c57e8a51052 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Thu, 10 May 2018 21:19:27 +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. See #43973. git-svn-id: https://develop.svn.wordpress.org/trunk@43236 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 380c0dff45..1bf62632ad 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3106,7 +3106,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(), @@ -3161,7 +3161,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.