Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate reassign user in user delete command #482

Merged
merged 3 commits into from
Mar 5, 2024
Merged

Validate reassign user in user delete command #482

merged 3 commits into from
Mar 5, 2024

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.

src/User_Command.php Outdated Show resolved Hide resolved
@danielbachhuber
Copy link
Member

Great work on this PR, @ernilambar !

@danielbachhuber danielbachhuber merged commit 1ab4ad0 into wp-cli:main Mar 5, 2024
36 checks passed
@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
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