[wp-trac] [WordPress Trac] #16841: Manually created user roles not showing in author dropdown regardless of assigned capabilities

WordPress Trac noreply at wordpress.org
Thu Jan 29 02:16:01 UTC 2015


#16841: Manually created user roles not showing in author dropdown regardless of
assigned capabilities
------------------------------------------+-----------------------------
 Reporter:  10sexyapples                  |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Role/Capability               |     Version:  3.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  2nd-opinion => needs-patch needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 As [comment:7 scribu said earlier], this is a mess. @lgladdy, thanks for
 digging into it.

 Something like 2 or 3 is probably worth exploring, at least for the short
 term. As you suggest, the only capability-related data we can easily query
 on a per-user basis is the deprecated `level` (which is the original
 problem here in the ticket) and `wpX_capabilities`, where `wpX_` is the
 current blog prefix. The latter piece of usermeta stores a serialized
 array of a user's roles for that blog, and the 'role' param of
 `WP_User_Query` translates to a LIKE query against this data. Doing this
 multiple times is going to scale pretty poorly, but it's not a great deal
 worse performance-wise than what's already there, and it will allow us to
 fix the various role-related bugs raised in this ticket.

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


More information about the wp-trac mailing list