Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#14708 closed defect (bug) (fixed)

Do not set role if it is the same

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

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 14 years ago.
Possible fix

Download all attachments as: .zip

Change History (5)

@nickmomrik
14 years ago

Possible fix

#1 @nickmomrik
14 years ago

  • Cc nickmomrik added

#3 @ryan
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#4 @ryan
14 years ago

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