[wp-trac] [WordPress Trac] #36196: Users without a role are not being displayed
WordPress Trac
noreply at wordpress.org
Thu Mar 10 16:27:33 UTC 2016
#36196: Users without a role are not being displayed
--------------------------+-----------------------------
Reporter: tobi823 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.4.2
Severity: normal | Keywords:
Focuses: ui |
--------------------------+-----------------------------
Users without a role are not displayed on the site user page. (in my case
http://localhost/wordpress1/wordpress/wp-admin/users.php). But the
invisible user are still being counted (e.g. i should have '4 items'
although no user is visible).
But on the network user page the users are visible. (in my case
http://localhost/wordpress1/wordpress/wp-admin/network/users.php).
I can reproduce this bug with PHP code:
{{{#!php
$wpUser = get_user_by('id', 35);
$wpUser->set_role('');
}}}
and with this SQL-Query:
DELETE FROM `wordpress1`.`wp_usermeta` WHERE `user_id`='35' AND
`meta_key`='wp_capabilities';
My only workaround is to use a non existing role:
{{{#!php
$wpUser = get_user_by('id', 35);
$wpUser->set_role('anonymous');
}}}
The strange thing is that this bug only exists on multi site
installations. Normal single site installations work fine.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36196>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list