Changeset 61137 – WordPress Trac (original) (raw)
Timestamp:
11/04/2025 06:58:49 PM (4 months ago)
johnjamesjacoby
Message:
Privacy: Set $request->confirm_key earlier so it can be reused in 2 places.
This commit updates the wp_send_user_request() function so that the updated confirmation key of the request is available to both the confirmation URL and the subsequent filters (specifically user_request_action_email_content).
This maintains the existing behavior of generating a new key just-in-time before every user request email is sent.
Props birgire, dingo_d, garrett-eclipse, johnjamesjacoby.
Fixes #44940.
File:
Legend:
Unmodified
Added
Removed
| r61038 | r61137 | |
|---|---|---|
| 4845 | 4845 | } |
| 4846 | 4846 | |
| 4847 | /* | |
| 4848 | * Generate the new user request key first, as it is used by both the $request | |
| 4849 | * object and the confirm_url array. | |
| 4850 | * See https://core.trac.wordpress.org/ticket/44940 | |
| 4851 | */ | |
| 4852 | request−>confirmkey=wpgenerateuserrequestkey(request->confirm_key = wp_generate_user_request_key( request−>confirmkey=wpgenerateuserrequestkey(request_id ); | |
| 4853 | ||
| 4847 | 4854 | $email_data = array( |
| 4848 | 4855 | 'request' => $request, |
| … | … | |
| 4853 | 4860 | 'action' => 'confirmaction', |
| 4854 | 4861 | 'request_id' => $request_id, |
| 4855 | 'confirm_key' => |
|
| 4862 | 'confirm_key' => $request->confirm_key, | |
| 4856 | 4863 | ), |
| 4857 | 4864 | wp_login_url() |
Note: See TracChangeset for help on using the changeset viewer.