Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/User_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ public function delete( $args, $assoc_args ) {
WP_CLI::error( 'Reassigning content to a different user is not supported on multisite.' );
}

if ( ! $reassign ) {
WP_CLI::confirm( '--reassign parameter not passed. All associated posts will be deleted. Proceed?', $assoc_args );
$is_reassign_valid = ( false === get_userdata( $reassign ) ) ? false : true;
Comment thread
danielbachhuber marked this conversation as resolved.
Resolved

if ( ! $reassign || ! $is_reassign_valid ) {
WP_CLI::confirm( '--reassign parameter not passed or invalid. All associated posts will be deleted. Proceed?', $assoc_args );
Comment thread
ernilambar marked this conversation as resolved.
Resolved
}

$users = $this->fetcher->get_many( $args );
Expand Down