[wp-trac] [WordPress Trac] #36961: wp_roles displays incorrect roles in multisite
WordPress Trac
noreply at wordpress.org
Mon Sep 25 17:03:50 UTC 2017
#36961: wp_roles displays incorrect roles in multisite
-------------------------------------------------+-------------------------
Reporter: ryanduff | Owner: flixos90
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.9
Component: Role/Capability | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses: multisite
note |
-------------------------------------------------+-------------------------
Comment (by flixos90):
[attachment:36961.9.diff] adds an extra test to make sure the new internal
`WP_User::get_caps_data()` method works correctly. Since it's private, it
is not called directly, but its return value is stored in
`WP_User::$caps`, so this can be checked.
This is good to go IMO, one final question: Should the new `$site_id`
property be public or private? It's currently private, but I've been
thinking it may be useful to be able to detect for which site a user's
capabilities are currently initialized. If we wanna be able to do that, we
could alternatively add a public `get_site_id()` method and still keep the
property private.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36961#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list