Skip to content

Conversation

@ernilambar
Copy link
Member

Fixes #461

  • This will perform sanity check for reassign value whether user is valid or not
  • Asks for confirmation if not valid

@ernilambar ernilambar requested a review from a team as a code owner February 29, 2024 05:57
@swissspidy
Copy link
Member

Can we add tests for this?

@ernilambar
Copy link
Member Author

Can we add tests for this?

@swissspidy I could not find a way to add feature test for this because behat test pauses due to WP_CLI::confirm() here.

@danielbachhuber danielbachhuber added command:user Related to 'user' command command:user-delete Related to 'user delete' command labels Mar 5, 2024
@danielbachhuber danielbachhuber added this to the 2.6.3 milestone Mar 5, 2024
@danielbachhuber danielbachhuber self-requested a review March 5, 2024 03:05
@danielbachhuber
Copy link
Member

Great work on this PR, @ernilambar !

@danielbachhuber danielbachhuber merged commit 1ab4ad0 into wp-cli:main Mar 5, 2024
@ernilambar ernilambar deleted the 461-reassign-invalid-user branch March 5, 2024 05:07
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-delete Related to 'user delete' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reassigning posts while deleting a user can result in lost posts if the target user does not exist

3 participants