[wp-trac] [WordPress Trac] #36196: Users without a role are not being displayed
WordPress Trac
noreply at wordpress.org
Fri Mar 24 21:30:57 UTC 2017
#36196: Users without a role are not being displayed
----------------------------------------+-----------------------------
Reporter: tobi823 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Users | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: multisite
----------------------------------------+-----------------------------
Comment (by brocheafoin):
Replying to [comment:5 flixos90]:
> I think there is a difference between a user not being active for a site
at all vs. a user not having any capabilities for a site.
The most obvious use case for a user without any capabilities is a former
author. You would want to leave them as author of their content but
prevent them from doing anything. When you remove a user completely, you
have to reassign their content to another user, which would not be
appropriate.
In that case,
> this user is in a broken state
would not be completely true.
Furthermore...
> users without roles (on any sites) are a special case. In multisite,
they have the "User Dashboard" as a fallback, and they are always visible
via the "Network Dashboard" users.php page.
This is all true, but as long as users without a roles aren't displayed in
the users table, there is no UI to actually _give_ them a role.
Additional consideration:
* The documentation for `WP_User->set_role()` says that "You can set the
role to an empty string and it will remove all of the roles from the
user." which is exactly how we end up with users without roles.
* `is_user_member_of_blog()` only verifies the
"$prefix_$blogid_capabilities" meta's existence to determine membership.
As far as it's concerned, users without a role are considered as members
of the site. Logically, they should be visible on the site's users table.
TL;DR: I'm @flixos90. Let's make users without roles first-class citizens.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36196#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list