[wp-trac] [WordPress Trac] #18934: Multisite issue cleaning up empty capabilities

WordPress Trac noreply at wordpress.org
Mon Feb 23 01:33:13 UTC 2015


#18934: Multisite issue cleaning up empty capabilities
-------------------------------------+------------------------
 Reporter:  jammitch                 |       Owner:  PeteMall
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  4.2
Component:  Role/Capability          |     Version:  3.0
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+------------------------
Changes (by jeremyfelt):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31516"]:
 {{{
 #!CommitTicketReference repository="" revision="31516"
 Avoid clearing stored capabilities for a user when removing their built in
 role in multisite.

 Previously, if “No role on this site” was assigned to a user AND that user
 did not have an empty role array stored for the site, the `$blog_prefix .
 ‘capabilities’` meta for that user would be deleted completely after
 changes to the user were saved. Any custom capabilities stored (i.e.
 `$user->add_role()`) would be removed as well.

 This removes the code controlling the old WPMU handling of “no role” and
 allows custom stored capabilities to remain. Users with no role and custom
 capabilities will now appear in the users list table with “None” as the
 role.

 In the process we’re able to better clarify the multisite specific pieces
 that do occur.

 Props PeteMall, jeremyfelt.

 Fixes #18934.
 }}}

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


More information about the wp-trac mailing list