[wp-trac] [WordPress Trac] #44379: GDPR filters should provide either $request or $request_id

WordPress Trac noreply at wordpress.org
Mon Jun 18 16:07:55 UTC 2018


#44379: GDPR filters should provide either $request or $request_id
-------------------------------+------------------------------
 Reporter:  garrett-eclipse    |       Owner:  (none)
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Privacy            |     Version:  4.9.6
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by garrett-eclipse):

 Hi @desrosj

 I assume you're speaking on the mention of $request in the docblocks like
 here;
 https://github.com/WordPress/WordPress/blob/3ee58b55b14683af4c568bce1845c37408c88fbb
 /wp-includes/user.php#L3379

 In actuality that's incorrect as the first object in $email_data is
 $request->email and not the $request or $request_id, and unless
 wp_get_user_request_data supports lookup via the email then it doesn't
 give you the request which is needed if you try to recreate say
 confirm_url in a similar fashion as it does now but by supplying a front-
 end page instead of wp-login.php;
 {{{
                 'confirm_url' => add_query_arg( array(
                         'action'      => 'confirmaction',
                         'request_id'  => $request_id,
                         'confirm_key' => wp_generate_user_request_key(
 $request_id ),
                 ), site_url( 'wp-login.php' ) ),
 }}}
 *This stems from the request in #44376, currently he'd have to recreate
 the wp-login.php code for confirmaction in his own page but without the
 request available to these filters it's hard to generate a similar
 confirm_url.

 So looking at the docblock again I think it was expected that the first
 item in the email_data array was supposed to be the request but it's not
 actually there.  So either the filters should provide it as a param or it
 should be part of email_data.

 Cheers

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44379#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list