Changes between Initial Version and Version 1 of Ticket #22361
- Timestamp:
- 11/05/2012 06:48:25 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22361 – Description
initial v1 3 3 If a user has multiple roles for a site (coming in bbPress 2.2) there are two places where their site role is not listed/calculated correctly: 4 4 5 * user.php 5 * user.php (via class-wp-users-list-table.php) 6 6 * user-edit.php 7 8 ---- 7 9 8 10 '''Details''' 9 11 10 12 A few places in !WordPress core assume a user can only have 1 role at a time. Because there currently is no wp_get_user_role() function, the logic to calculate a user's primary role varies in the above locations. There may be more than just this, but these are the two immediate problems. 13 14 ---- 11 15 12 16 '''Duplicate''' … … 25 29 * Notice that user now shows: "Participant" in both "Site Role" and "Forums Role" 26 30 31 ---- 32 27 33 '''Solution''' 28 34 29 35 The gateway to separating out !WordPress core roles from any additional roles right now is the get_editable_roles() function. Plugins that attempt to implement their own secondary roles must filter their roles out of this array to prevent overwriting the primary site role with a secondary role. Thus, intersecting a user's roles against the keys of get_editable_roles() ensures an accurate match. 30 36 37 ---- 38 31 39 '''Patch''' 32 40