Opened 3 years ago

Closed 3 years ago

#14708 closed defect (bug) (fixed)

Do not set role if it is the same

Reported by: nickmomrik Owned by:
Priority: normal Milestone: 3.1
Component: Role/Capability Version: 3.0.1
Severity: normal Keywords:
Cc: nickmomrik

Description

When set_role is called it doesn't check to see if the role is changing. So we can update the user and fire the set_user_role action even when nothing is changing.

To reproduce go to the Users screen and "change" the role of an Administrator to an Administrator. Or use wp-admin/ms-sites.php to update options. The user will be updated and the set_user_role action fires.

Attachments (1)

set-role.diff (520 bytes) - added by nickmomrik 3 years ago.
Possible fix

Download all attachments as: .zip

Change History (5)

Possible fix

  • Cc nickmomrik added

comment:3   ryan3 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:4   ryan3 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.