[wp-trac] [WordPress Trac] #28374: Calling WP_User::add_cap does not flush capabilities

WordPress Trac noreply at wordpress.org
Tue Mar 17 07:57:49 UTC 2015


#28374: Calling WP_User::add_cap does not flush capabilities
------------------------------------+--------------------------
 Reporter:  rmccue                  |       Owner:  rachelbaker
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  4.2
Component:  Users                   |     Version:  2.0
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+--------------------------

Comment (by rmccue):

 Found another instance of this one: adding a cap to a role that the
 current user has. Requires a page reload for it to kick in.

 Not sure how to get around that; maybe `allcaps` needs to be deprecated
 and replaced with a `__get` accessor instead?

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


More information about the wp-trac mailing list