Skip to content

Add a new command for resetting a user password#119

Merged
schlessera merged 5 commits intomasterfrom
reset-password-cmd
Dec 22, 2017
Merged

Add a new command for resetting a user password#119
schlessera merged 5 commits intomasterfrom
reset-password-cmd

Conversation

@danielbachhuber
Copy link
Member

No description provided.

@danielbachhuber danielbachhuber requested a review from a team December 18, 2017 23:32
@danielbachhuber danielbachhuber added this to the 1.2.0 milestone Dec 18, 2017
@danielbachhuber danielbachhuber added command:user Related to 'user' command command:user-reset-password Related to 'user reset-password' command labels Dec 18, 2017
if ( $skip_email ) {
remove_filter( 'send_password_change_email', '__return_false' );
}
WP_CLI::success( 'Passwords reset.' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how other commands handle this, but can we change the success message a bit? Like this:

if ( 1 === count( $users ) ) {
	WP_CLI::success( 'Password reset.' );
} else {
	WP_CLI::success( 'Passwords reset.' );
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how other commands handle this, but can we change the success message a bit?

Good catch. The other commands pluralize based on the number of entities affected.

Updated in 7a575ba

@schlessera schlessera merged commit 4933b26 into master Dec 22, 2017
@schlessera schlessera deleted the reset-password-cmd branch December 22, 2017 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:user Related to 'user' command command:user-reset-password Related to 'user reset-password' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants