diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index 8e356babd8b4..9ea168d03ed3 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -28,6 +28,7 @@ use App\Models\Account; use App\Models\Timezone; use App\Notifications\Ninja\NewAccountCreated; use App\Utils\Ninja; +use App\Utils\Traits\User\LoginCache; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -39,6 +40,7 @@ use Turbo124\Beacon\Facades\LightLogs; class CreateAccount { use Dispatchable; + use LoginCache; protected $request; @@ -77,9 +79,6 @@ class CreateAccount $sp794f3f->save(); - if(Ninja::isHosted()) - $sp794f3f->startTrial('pro'); - $sp035a66 = CreateCompany::dispatchNow($this->request, $sp794f3f); $sp035a66->load('account'); $sp794f3f->default_company_id = $sp035a66->id; @@ -95,6 +94,8 @@ class CreateAccount } $spaa9f78->setCompany($sp035a66); + $this->setLoginCache($spaa9f78); + $spafe62e = isset($this->request['token_name']) ? $this->request['token_name'] : request()->server('HTTP_USER_AGENT'); $sp2d97e8 = CreateCompanyToken::dispatchNow($sp035a66, $spaa9f78, $spafe62e);