Skip to content

Allow filtering user list by users with no role #34

Closed

Description

@johnbillion

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

Activity

  1. added
    command:user-list
    on Jul 25, 2017
  2. johnbillion commented on Jul 25, 2017

    @johnbillion
    ContributorAuthor

    The core bug is now fixed in trunk, scheduled for 4.9.

  3. danielbachhuber commented on Jul 25, 2017

    @danielbachhuber
    Member

    @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 ?

  4. johnbillion commented on Aug 2, 2017

    @johnbillion
    ContributorAuthor

    I'll take a look.

  5. added
    command:user
    on Aug 15, 2017
  6. danielbachhuber commented on Dec 15, 2017

    @danielbachhuber
    Member

    @johnbillion Can you write a simple Behat test to describe how you'd like this to behave?

  7. added a commit that references this issue on Aug 14, 2022
  8. BhargavBhandari90 commented on Aug 14, 2022

    @BhargavBhandari90
    Contributor

    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.

  9. added a commit that references this issue on Aug 14, 2022
  10. danielbachhuber commented on Aug 16, 2022

    @danielbachhuber
    Member

    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?

    Just the latter at the moment — users with no role.

  11. added 3 commits that reference this issue on Aug 19, 2022
  12. added this to the 2.2.3 milestone on Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    command:usercommand:user-list

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions