diff --git a/app/Console/Commands/DeleteRemoteProfile.php b/app/Console/Commands/DeleteRemoteProfile.php new file mode 100644 index 000000000..09708f7e8 --- /dev/null +++ b/app/Console/Commands/DeleteRemoteProfile.php @@ -0,0 +1,50 @@ + strlen($value) > 2 + ? Profile::whereNotNull('domain')->where('username', 'like', $value . '%')->pluck('username', 'id')->all() + : [] + ); + $profile = Profile::whereNotNull('domain')->find($id); + + if(!$profile) { + $this->error('Could not find profile.'); + exit; + } + + $confirmed = confirm('Are you sure you want to delete ' . $profile->username . '\'s account? This action cannot be reversed.'); + DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('delete'); + $this->info('Dispatched delete job, it may take a few minutes...'); + exit; + } +}