[wp-trac] [WordPress Trac] #35124: Add get_user() function that maps to get_user_by()
WordPress Trac
noreply at wordpress.org
Wed Jul 31 06:03:17 UTC 2024
#35124: Add get_user() function that maps to get_user_by()
-------------------------------------------------+-------------------------
Reporter: sc0ttkclark | Owner: joedolson
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.7
Component: Users | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
I think adding an alias is the most that can safely be done with this. The
functionality would need to remain in `get_userdata()` as it's a pluggable
function so there's no way of knowing whether the function is Core's or a
plugin's.
If an alias is added, it doesn't need to be pluggable and can be placed
among the standard user functions. That will ensure that plugins continue
to plug the correct code.
I do like the idea, it's a much nicer name and inevitably what I reach for
when trying to get a user only to discover that it's not there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35124#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list