Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
@@ -29,9 +28,10 @@ class AdminRemoveUser extends Command
|
||||
{
|
||||
try {
|
||||
$email = $this->argument('email');
|
||||
$confirm = $this->confirm('Are you sure you want to remove user with email: ' . $email . '?');
|
||||
if (!$confirm) {
|
||||
$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");
|
||||
@@ -40,6 +40,7 @@ class AdminRemoveUser extends Command
|
||||
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();
|
||||
@@ -48,6 +49,7 @@ class AdminRemoveUser extends Command
|
||||
} catch (\Exception $e) {
|
||||
$this->error('Failed to remove user.');
|
||||
$this->error($e->getMessage());
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user