Fix auth form errors and redirects: Add React keys/useEffects for error rendering and scroll, Inertia::location in controllers for SPA navigation, extend RegistrationTest and add E2E. Update docs (changes/2025-10-02-registration-fixes.md, prp/13-backend-authentication.md). Add new UI components (accordion, carousel, progress, table, tabs), marketing/legal pages (Blog, Kontakt, Datenschutz, etc.), fonts, user migration (remove_name), views/css/package updates, seeders/factories.
This commit is contained in:
@@ -19,6 +19,10 @@ class AddDummyTenantUser extends Command
|
||||
{--password=secret123!}
|
||||
{--tenant="Demo Tenant"}
|
||||
{--name="Demo Admin"}
|
||||
{--first_name="Demo"}
|
||||
{--last_name="Admin"}
|
||||
{--address="Demo Str. 1, 12345 Demo City"}
|
||||
{--phone="+49 123 4567890"}
|
||||
{--update-password : Overwrite password if user already exists}
|
||||
';
|
||||
protected $description = 'Create a demo tenant and a tenant user with given credentials.';
|
||||
@@ -29,6 +33,12 @@ class AddDummyTenantUser extends Command
|
||||
$password = (string) $this->option('password');
|
||||
$tenantName = (string) $this->option('tenant');
|
||||
$userName = (string) $this->option('name');
|
||||
$firstName = (string) $this->option('first_name');
|
||||
$lastName = (string) $this->option('last_name');
|
||||
$address = (string) $this->option('address');
|
||||
$phone = (string) $this->option('phone');
|
||||
|
||||
$this->info('Starting dummy tenant creation with email: ' . $email);
|
||||
|
||||
// Pre-flight checks for common failures
|
||||
if (! Schema::hasTable('users')) {
|
||||
@@ -53,12 +63,17 @@ class AddDummyTenantUser extends Command
|
||||
$tenant->domain = null;
|
||||
$tenant->contact_name = $userName;
|
||||
$tenant->contact_email = $email;
|
||||
$tenant->contact_phone = null;
|
||||
$tenant->contact_phone = $phone ?: null;
|
||||
$tenant->event_credits_balance = 1;
|
||||
$tenant->max_photos_per_event = 500;
|
||||
$tenant->max_storage_mb = 1024;
|
||||
$tenant->features = ['custom_branding' => false];
|
||||
$tenant->is_active = true;
|
||||
$tenant->is_suspended = false;
|
||||
$tenant->save();
|
||||
$this->info('Created new tenant: ' . $tenant->name);
|
||||
} else {
|
||||
$this->info('Using existing tenant: ' . $tenant->name);
|
||||
}
|
||||
|
||||
// Create or fetch user
|
||||
@@ -70,9 +85,15 @@ class AddDummyTenantUser extends Command
|
||||
if (Schema::hasColumn($user->getTable(), 'name')) $user->name = $userName;
|
||||
$user->email = $email;
|
||||
$user->password = Hash::make($password);
|
||||
$this->info('Creating new user: ' . $email);
|
||||
} else if ($updatePassword) {
|
||||
$user->password = Hash::make($password);
|
||||
$this->info('Updating password for existing user: ' . $email);
|
||||
}
|
||||
if (Schema::hasColumn($user->getTable(), 'first_name')) $user->first_name = $firstName;
|
||||
if (Schema::hasColumn($user->getTable(), 'last_name')) $user->last_name = $lastName;
|
||||
if (Schema::hasColumn($user->getTable(), 'address')) $user->address = $address;
|
||||
if (Schema::hasColumn($user->getTable(), 'phone')) $user->phone = $phone;
|
||||
if (Schema::hasColumn($user->getTable(), 'tenant_id')) {
|
||||
$user->tenant_id = $tenant->id;
|
||||
}
|
||||
@@ -80,11 +101,13 @@ class AddDummyTenantUser extends Command
|
||||
$user->role = 'tenant_admin';
|
||||
}
|
||||
$user->save();
|
||||
$this->info('User saved successfully.');
|
||||
|
||||
DB::commit();
|
||||
} catch (\Throwable $e) {
|
||||
DB::rollBack();
|
||||
$this->error('Failed: '.$e->getMessage());
|
||||
$this->error('Stack trace: ' . $e->getTraceAsString());
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user