Skip to content

wp user create ignores --nickname #274

Closed

Description

@Hlsgs

wp user create ignores --nickname and always uses the username instead

Activity

  1. johnbillion commented on Aug 10, 2020

    @johnbillion
    Contributor

    It looks like this affects other fields too, such as --user_nicename and --user_url. See #301 .

  2. schlessera commented on Jan 13, 2022

    @schlessera
    Member

    Weirdly enough, the nickname is only available when you retrieve users via get_users(), and not when you retrieve them via get_user_by()... See wp-cli/wp-cli#5600

  3. Hlsgs commented on Jan 26, 2022

    @Hlsgs
    Author

    Confirming still present in wp cli v2.6.0

  4. schlessera commented on Jan 26, 2022

    @schlessera
    Member

    @Hlsgs Yes, indeed. I did some work in solving this, but it turns around it is mostly a bug in get_users(). I then tried to use WP_User_Query across the board for all WP-CLI user queries, but that just turned up with different bugs of its own.
    This needs more careful investigation in how best to solve.

  5. Hlsgs commented on Jan 26, 2022

    @Hlsgs
    Author

    @Hlsgs Yes, indeed. I did some work in solving this, but it turns around it is mostly a bug in get_users(). I then tried to use WP_User_Query across the board for all WP-CLI user queries, but that just turned up with different bugs of its own. This needs more careful investigation in how best to solve.

    Got it! Thank you for the lowdown.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions