[wp-trac] [WordPress Trac] #19134: Update the user role hook to include old roles.

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 3 19:33:36 UTC 2011


#19134: Update the user role hook to include old roles.
-----------------------------+-----------------------------
 Reporter:  awellis13        |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Role/Capability  |    Version:  3.3
 Severity:  normal           |   Keywords:  has-patch
-----------------------------+-----------------------------
 While developing a plugin I needed to see the transition in roles. This is
 because I am delaying the sending of the new user welcome email until a
 certain role has been set. So I want to see if a certain role existed
 before when setting the new role. If yes, send the email.

 Of course, I could hook on earlier in the actions and cache the current
 user's role, but it would be much easier if the old roles were passed into
 "set_user_role".

 Attached is a diff of the change.

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


More information about the wp-trac mailing list