[wp-trac] [WordPress Trac] #22361: Users with multiple roles show incorrect primary role in list-table and when editing
WordPress Trac
noreply at wordpress.org
Mon Nov 19 19:38:28 UTC 2012
#22361: Users with multiple roles show incorrect primary role in list-table and
when editing
-----------------------------+---------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.5
Component: Role/Capability | Version:
Severity: major | Resolution: fixed
Keywords: has-patch |
-----------------------------+---------------------
Changes (by nacin):
* keywords: has-patch needs-unit-tests => has-patch
* status: new => closed
* resolution: => fixed
* severity: critical => major
Comment:
I'm not sure about the final bit — multisite role deletion. It makes sense
in theory. But the raw query a few lines up prevents any deletion if any
other roles or capabilities exist for that user.
Of course, a plugin like bbPress could be hooking into edit_user() and
adding additional roles at the same time. That could then cause them all
to disappear accidentally. But isn't that the point? The user doesn't have
a role and we're trying to be careful to not accidentally grant anything.
bbPress may be doing it deliberately, but that might not be the case for
another plugin. I don't know how best to proceed, which leads me to
strongly believe the remaining issue must be punted. I'm happy to revisit
multiple roles in 3.6. See also my "In the future" comment in [22686].
It seems like the real fix here is to patch edit_user(), wp_update_user(),
etc., rather than having this pretty terrible multisite hack. A plugin
like bbPress that deliberately wants to assign (or keep) roles should be
able to work around this bug for now, as they (may) have been.
So — closing this, and a new ticket please for the last bit.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22361#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list