[wp-trac] [WordPress Trac] #56028: Pass the user object instead of recall get user function
WordPress Trac
noreply at wordpress.org
Fri Sep 23 18:00:49 UTC 2022
#56028: Pass the user object instead of recall get user function
-------------------------------------------------+-------------------------
Reporter: pbearne | Owner:
| davidbaumwald
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting
| Review
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion |
-------------------------------------------------+-------------------------
Changes (by davidbaumwald):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests 2nd-
opinion
Comment:
Thinking about this a bit more, I am a little concerned about changing the
signature here based on its age and the fact that this shares
commonality/consistency with the `retrieve_password` filter that's used
elsewhere.
A directory search for `retrieve_password` shows some false
positives(custom functions, etc.) and some point to the usage of the
filter, not the function.
The spirit of this function is heavily influenced by the user's login,
either passed directly or referenced in the current $_REQUEST vars.
Also, I agree with @spacedmonkey about the caching being used here, so I
think the hit might be negligible.
I think it's possible to update the function to allow for `WP_User` object
to be passed and grab the `user_login` prop if it was indeed passed.
Marking this for `2nd-opinion` to hopefully get some guidance.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56028#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list