Make WordPress Core

Changeset 43237


Ignore:
Timestamp:
05/10/2018 09:21:53 PM (7 years ago)
Author:
SergeyBiryukov
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.
Merges [43236] to the 4.9 branch.
See #43973.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/user.php

    r43233 r43237  
    30293029    $email_data = array(
    30303030        'request'            => $request_data,
    3031         'user_email'         => $request_data->email,
     3031        'message_recipient'  => $user_email,
    30323032        'privacy_policy_url' => get_privacy_policy_url(),
    30333033        'sitename'           => get_option( 'blogname' ),
     
    30843084     *
    30853085     *     @type WP_User_Request $request            User request object.
    3086      *     @type string          $user_email         The email address confirming a request.
     3086     *     @type string          $message_recipient  The address that the email will be sent to. Defaults
     3087     *                                               to the value of `$request->email`, but can be changed
     3088     *                                               by the `user_erasure_fulfillment_email_to` filter.
    30873089     *     @type string          $privacy_policy_url Privacy policy URL.
    30883090     *     @type string          $sitename           The site name sending the mail.
Note: See TracChangeset for help on using the changeset viewer.