Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Changes auto-committed by Conductor

Andras Bacsai2b51363b8c00
diff --git a/app/Console/Commands/Cloud/CloudDeleteUser.php b/app/Console/Commands/AdminDeleteUser.php
similarity index 99%
rename from app/Console/Commands/Cloud/CloudDeleteUser.php
rename to app/Console/Commands/AdminDeleteUser.php
index eb1a27fa81..9b803b1f7e 100644
--- a/app/Console/Commands/Cloud/CloudDeleteUser.php
+++ b/app/Console/Commands/AdminDeleteUser.php
@@ -1,6 +1,6 @@
<?php
-namespace App\Console\Commands\Cloud;
+namespace App\Console\Commands;
use App\Actions\Stripe\CancelSubscription;
use App\Actions\User\DeleteUserResources;
@@ -12,16 +12,16 @@ use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
-class CloudDeleteUser extends Command
+class AdminDeleteUser extends Command
{
- protected $signature = 'cloud:delete-user {email}
+ protected $signature = 'admin:delete-user {email}
{--dry-run : Preview what will be deleted without actually deleting}
{--skip-stripe : Skip Stripe subscription cancellation}
{--skip-resources : Skip resource deletion}
{--auto-confirm : Skip all confirmation prompts between phases}
{--force : Bypass the lock check and force deletion (use with caution)}';
- protected $description = 'Delete a user with phase-by-phase confirmation (works on cloud and self-hosted)';
+ protected $description = 'Delete a user with comprehensive resource cleanup and phase-by-phase confirmation (works on cloud and self-hosted)';
private bool $isDryRun = false;
diff --git a/app/Console/Commands/AdminRemoveUser.php b/app/Console/Commands/AdminRemoveUser.php
deleted file mode 100644
index d4534399cd..0000000000
--- a/app/Console/Commands/AdminRemoveUser.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-namespace App\Console\Commands;
-
-use App\Models\User;
-use Illuminate\Console\Command;
-
-class AdminRemoveUser extends Command
-{
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'admin:remove-user {email}';
-
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Remove User from database';
-
- /**
- * Execute the console command.
- */
- public function handle()
- {
- try {
- $email = $this->argument('email');
- $confirm = $this->confirm('Are you sure you want to remove user with email: '.$email.'?');
- if (! $confirm) {
- $this->info('User removal cancelled.');
-
- return;
- }
- $this->info("Removing user with email: $email");
- $user = User::whereEmail($email)->firstOrFail();
- $teams = $user->teams;
- foreach ($teams as $team) {
- if ($team->members->count() > 1) {
- $this->error('User is a member of a team with more than one member. Please remove user from team first.');
-
- return;
- }
- $team->delete();
- }
- $user->delete();
- } catch (\Exception $e) {
- $this->error('Failed to remove user.');
- $this->error($e->getMessage());
-
- return;
- }
- }
-}