#32060 closed enhancement (fixed)
Add actions for add_role() and remove_role()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | good-first-bug has-patch commit |
Focuses: | Cc: |
Description
set_user_role()
has an action which is nice for audit purposes. It would be great if add_role()
and remove_role()
had similar actions to make sure there aren't any leaky spots in the audit log.
Attachments (2)
Change History (11)
This ticket was mentioned in Slack in #core by shooper. View the logs.
10 years ago
#5
@
10 years ago
- Focuses docs removed
- Keywords commit added
- Owner changed from SergeyBiryukov to shooper
32060.2.diff adjusts the hook docs syntax and adds @since
versions for 4.3.
#6
@
10 years ago
All hooks in WordPress with the word "added" or "deleted" use it as a prefix, not a suffix. Verb + noun is pretty common for us. I'm going to change this to added_user_role and removed_user_role.
#7
@
10 years ago
Consistency!
- I was going to change
$this->id
to$this
, butset_user_role
uses$this->id
.
- I was going to change these to
added_user_role
andremoved_user_role
, but to matchset_user_role
, I'm going to go withadd_user_role
andremove_user_role
instead.
This ticket was mentioned in Slack in #meta by sergey. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
Thanks for submitting this Daniel. It's something that was bothering me too. I've created the patch for it.