Fixed user create in filament

This commit is contained in:
Constantin Graf
2025-02-06 14:00:59 -05:00
parent 09b168cddb
commit 0a956fd9e7
6 changed files with 74 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ class UserCreateCommand extends Command
}
$user = null;
DB::transaction(function () use (&$user, $name, $email, $password): void {
DB::transaction(function () use (&$user, $name, $email, $password, $verifyEmail): void {
$user = app(UserService::class)->createUser(
$name,
$email,
@@ -65,6 +65,7 @@ class UserCreateCommand extends Command
'UTC',
Weekday::Monday,
'EUR',
$verifyEmail
);
});
/** @var Organization|null $organization */
@@ -73,10 +74,6 @@ class UserCreateCommand extends Command
throw new LogicException('User does not have an organization');
}
if ($verifyEmail) {
$user->markEmailAsVerified();
}
$this->info('Created user "'.$name.'" ("'.$email.'")');
$this->line('ID: '.$user->getKey());
$this->line('Name: '.$name);