Ticket #19134 (new enhancement)

Opened 7 months ago

Last modified 7 months ago

Update the user role hook to include old roles.

Reported by: awellis13 Owned by:
Priority: normal Milestone: Future Release
Component: Role/Capability Version: 3.2.1
Severity: normal Keywords: has-patch commit 3.4-early
Cc: alexkingorg, awellis13, devin@…

Description

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.

Attachments

roleaction.diff Download (708 bytes) - added by awellis13 7 months ago.

Change History

  • Cc devin@… added
  • Keywords commit 3.4-early added
  • Version changed from 3.3 to 3.2.1
  • Milestone changed from Awaiting Review to Future Release

Reminded me of the previous change here: #14708.

Looks good.

Note: See TracTickets for help on using tickets.