You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow filtering user list by users with no role #34
The wp user list command accepts a --role filter, but this does not support users with no role.
In wp-admin, the Users screen now supports filtering by users with no role. It uses none as the role name.
Bear in mind there is a bug in core at the moment which prevents such users from appearing when multisite is enabled. Might want to wait until this is fixed: https://core.trac.wordpress.org/ticket/36196
@johnbillion Based on the commit, it seems like WP-CLI is unaffected and could implement this enhancement without WP 4.9 as a requirement. Is my assessment correct?
It uses none as the role name.
To clarify, the WP-CLI implementation would be wp user list --role=none ?
Activity
johnbillion commentedon Jul 25, 2017
The core bug is now fixed in trunk, scheduled for 4.9.
danielbachhuber commentedon Jul 25, 2017
@johnbillion Based on the commit, it seems like WP-CLI is unaffected and could implement this enhancement without WP 4.9 as a requirement. Is my assessment correct?
To clarify, the WP-CLI implementation would be
wp user list --role=none?johnbillion commentedon Aug 2, 2017
I'll take a look.
danielbachhuber commentedon Dec 15, 2017
@johnbillion Can you write a simple Behat test to describe how you'd like this to behave?
Issue wp-cli#34: Allow to get users with no role
BhargavBhandari90 commentedon Aug 14, 2022
I think for this, we need to allow user adding without role using
wp user create?OR we are just looking for getting users with no role?
Currently adding PR for getting users with no role only.
Issue wp-cli#34: fix phpcs
danielbachhuber commentedon Aug 16, 2022
Just the latter at the moment — users with no role.
Issue wp-cli#34: Add behat test for listing no role users
Issue wp-cli#34: Improve behat test for listing no role users
Issue wp-cli#34: Improve behat test for listing no role users