[wp-trac] [WordPress Trac] #19747: Roles add_cap should call update_user_level_from_caps()

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 5 11:17:32 UTC 2012


#19747: Roles add_cap should call update_user_level_from_caps()
-----------------------------+-----------------------------
 Reporter:  lgladdy          |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Role/Capability  |    Version:  3.3.1
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 Hey guys,

 I've created a new user role, which didn't appear in the Author drop down
 list due to #16841. The workaround is to add a level_1 capability to that
 user, but because wordpress doesn't call update_user_level_from_caps()
 function when you add_cap, that isn't actually applied to existing users
 on the role, and you have to move them to a different role and back again
 if you want to apply the changed user role.

 I'd suggest adding a call to update_user_level_from_caps() to add_cap (and
 remove_cap) to fix this in wp-includes/capabilities.php

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19747>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list