[wp-trac] [WordPress Trac] #34655: Allow pre-filtering of role changes on WP_User

WordPress Trac noreply at wordpress.org
Wed Nov 11 03:44:25 UTC 2015


#34655: Allow pre-filtering of role changes on WP_User
-------------------------+-----------------------
 Reporter:  tellyworth   |       Owner:  pento
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.4
Component:  Users        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------

Comment (by pento):

 [attachment:34655.2.diff] refreshes the patch to apply cleanly against
 trunk, makes some coding style tweaks.

 In `set_role()`, it's possible to send an empty role, which will cause all
 user roles to be removed. This existing behaviour is incompatible with the
 short-circuit behaviour we're after.

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


More information about the wp-trac mailing list