seats->guardClient($emailField); $client = User::create([ 'type' => UserType::Client, 'active' => true, 'account_requested' => false, 'role_id' => Role::query()->where('name', SystemRole::Client->value)->value('id'), 'name' => $name, 'email' => $email, 'password' => $password, 'storage_quota_mb' => $storageQuotaMb, ]); // forceFill, and not part of the create() array above: like // StaffAccounts, email_verified_at is deliberately absent from // User::$fillable — where an account stands is a security decision // rather than an attribute — so mass assignment drops it in // silence. Every client-creation path used to pass it in that // array and lose it. The intent is real: an account created by // somebody who already knows who this is has no address to // confirm and nobody to confirm it to. (Inert today, since // MustVerifyEmail is not enabled on the model, but the column is // what a later switch would read.) $client->forceFill(['email_verified_at' => now()])->save(); $this->activity->log(Action::UserCreated, subject: $client); if ($welcome && $this->settings->get(Setting::EmailNotificationsEnabled) === true) { $client->notify(new ClientWelcomeNotification); } return $client; } }