[wp-trac] [WordPress Trac] #36196: Users without a role are not being displayed

WordPress Trac noreply at wordpress.org
Tue Aug 9 19:16:41 UTC 2016


#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 johnjamesjacoby):

 This happens in single-site also.

 * Log in as an admin
 * Create a user
 * Delete that user's role & caps usermeta entries via your favorite MySQL
 editing tool, or `delete_user_meta()`
 * Visit `wp-admin/users.php`
 * Now you have an invisible user

 This has a few (mostly experiential) consequences:

 * The new user is completely hidden, even from admins
 * Admins are unaware that there is a rogue user in the database
 * Admins cannot give this user a role using the UI
 * That new user has no `read` cap, so they can login, but get redirected
 to a `wp_die()` page

 ----

 That said, this user is in a broken state, and there are only so many ways
 that WordPress can (or should) compensate for malformed or missing data.
 What if a post object has no `post_status`? How did that happen? What
 should happen now?

 I do believe that when it comes to user accounts, 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. I'd like to see parity in single-site.

 * Turn `/wp-admin/user/` into a first-class citizen. Enable it for single-
 site, and redirect `/wp-admin/profile.php` to it.
 * On single-site, provide an additional "status" for users without any
 role entries in `usermeta`.
 * On multi-site, provide an additional "status" for users with empty role
 entries in `usermeta`.

 ----

 I'd also vote to remove the `multisite` focus from this ticket. I think
 this is more of an improvement to how users and their roles are
 communicated through the UI, than it is specific to a multisite
 configuration.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36196#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list