From 8ea6044555a8074c0cd336d6dd08ee9f7bd2258d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 13 Mar 2023 17:31:30 +1100 Subject: [PATCH] move NinjaUser to sync when creating accounts --- app/Http/Controllers/AccountController.php | 2 +- app/Jobs/Account/CreateAccount.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 6afe275e37..268b54e71d 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -154,7 +154,7 @@ class AccountController extends BaseController $truth->setUser(auth()->user()); $truth->setCompany($ct->first()->company); - return $this->listResponse($ct); + return $this->listResponse($ct->fresh()); } public function update(UpdateAccountRequest $request, Account $account) diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index 756c744e37..a010f82722 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -126,7 +126,7 @@ class CreateAccount NinjaMailerJob::dispatch($nmo, true); - \Modules\Admin\Jobs\Account\NinjaUser::dispatch([], $sp035a66); + (new \Modules\Admin\Jobs\Account\NinjaUser([], $sp035a66))->handle(); } VersionCheck::dispatch();