[wp-trac] [WordPress Trac] #58001: Lazy load user capabilities in WP_User object
WordPress Trac
noreply at wordpress.org
Thu Oct 9 20:38:49 UTC 2025
#58001: Lazy load user capabilities in WP_User object
--------------------------------------------+------------------------------
Reporter: spacedmonkey | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests early | Focuses: multisite,
| performance
--------------------------------------------+------------------------------
Comment (by bradshawtm):
Like the comment above, I ran into issues with `get_object_vars()` not
populating those properties; it's easy enough to work around, but I'd
worry about code unaware of these changes that makes assumptions based on
a blind use of `get_object_vars()`.
I also ran into a case in our code where we were modifying keys in the
`allcaps` array, though that type of behavior is probably specifically
what the change is trying to gate, so no concerns on that point.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58001#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list