Make WordPress Core


Ignore:
Timestamp:
05/10/2018 09:19:27 PM (6 years ago)
Author:
iandunn
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r43232 r43236  
    31073107    $email_data = array(
    31083108        'request'            => $request_data,
    3109         'user_email'         => $request_data->email,
     3109        'message_recipient'  => $user_email,
    31103110        'privacy_policy_url' => get_privacy_policy_url(),
    31113111        'sitename'           => get_option( 'blogname' ),
     
    31623162     *
    31633163     *     @type WP_User_Request $request            User request object.
    3164      *     @type string          $user_email         The email address confirming a request.
     3164     *     @type string          $message_recipient  The address that the email will be sent to. Defaults
     3165     *                                               to the value of `$request->email`, but can be changed
     3166     *                                               by the `user_erasure_fulfillment_email_to` filter.
    31653167     *     @type string          $privacy_policy_url Privacy policy URL.
    31663168     *     @type string          $sitename           The site name sending the mail.
Note: See TracChangeset for help on using the changeset viewer.