[wp-trac] [WordPress Trac] #36961: wp_roles displays incorrect roles in multisite

WordPress Trac noreply at wordpress.org
Wed Sep 27 20:47:04 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.10.diff] introduces the `WP_User::get_site_id()` method
 to allow retrieving the ID of the site for which the user's capabilities
 are currently initialized for, as suggested above. It also adds two
 integration tests for the method. One of the tests added in
 [attachment:36961.9.diff] was furthermore made available for non-multisite
 setups too (it was previously restricted to multisite-only for no reason).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36961#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list