Make WordPress Core

Opened 5 years ago

Closed 11 months ago

#16291 closed defect (bug) (fixed)

user role drop down inaccurate on ms-sites.php

Reported by: hughestm@… Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.0.4
Component: Role/Capability Keywords:
Focuses: multisite Cc:


If a user has been assigned a role and an individual capability, the user list doesn't show the correct role for the user.

This is the scenario to replicate this issue. User is currently given one role (ie. editor). Then some plug-in adds an individual capability (db has role and cap serialized - order is important). You then go and change the role(ie. publisher) of that user using ms-sites.php (db has cap then role serialized). When you return to ms-sites.php (not immediate page load, but refresh, or new page load), the drop down menu for the user in question will show Administrator. It appears, that ms-sites is pulling the first item from the serialized list, and since it isn't a role, it doesn't know how to populate the drop down.

This is a particular issue, if you go to the page to change any information not related to user permissions. Anyone whose accounts had the extra cap would suddenly become Administrators.

There may be other scenarios where this same things happens, but as best I can tell this is the particular scenario that is causing me problems.

Also, I do realize that there is a potential for user->role->cap overhaul in a future release, but since it doesn't seem to be part of the 3.1 milestone, I thought this should be fixed.

As another note, the users.php page seems to handle this scenario a bit better. The solution might be over there.

Change History (3)

comment:1 @scribu5 years ago

  • Component changed from General to Role/Capability
  • Milestone changed from Awaiting Review to Future Release

We are only dealing with regressions from the previous version in the 3.1 milestone now, so this won't make it in the next release anyway.

comment:2 @chriscct712 months ago

  • Keywords needs-patch added; roles capabilities network removed

comment:3 @jeremyfelt11 months ago

  • Keywords needs-patch removed
  • Milestone changed from Future Release to 3.5
  • Resolution set to fixed
  • Status changed from new to closed

Things have come a long way since roles were selectable for a user in wp-admin/ms-sites.php. Without going deep on history, this was effectively fixed in [22687] for #22361 in 3.5.

Note: See TracTickets for help on using tickets.