Skip to content

"user reset-password" doesn't display the new randomly-generated password, suggest adding a switch to enable #342

@dsXLII

Description

@dsXLII

Feature Request

Describe your use case and the problem you are facing

wp user reset-password username does not display the new password.

As a comparison/example: when you create a new user with the CLI, and don't specify a password, the new randomly-generated password is displayed. Admittedly this is a different use case, in that you only create one account at a time with wp user create but you can reset multiple users' passwords.

Describe the solution you'd like

When resetting the password of a single user, I would like the option of having the password displayed. Something like wp user reset-password foo --show-password or similar.

This probably should NOT be done by default, because that would be a change to existing behavior, and if users are currently doing password resets in an automated fashion could lead to passwords being logged in places where they weren't before and thus comes as a surprise. And I'm not sure it makes sense to do so when multiple users are specified on the command line. (Or at least that's a bit more of a refactor than adding a switch, as you'd then have to handle fields and otherwise do a proper "generate output" routine.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions