From cfeee5f98c8a8502da17f8362a7355c8e54998ac Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 15 Dec 2021 10:37:54 +1100 Subject: [PATCH 1/2] Move include for constants --- public/index.php | 2 ++ routes/web.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index 928f8818c100..2568d6704c02 100644 --- a/public/index.php +++ b/public/index.php @@ -31,8 +31,10 @@ require __DIR__.'/../bootstrap/autoload.php'; | */ + $app = require_once __DIR__.'/../bootstrap/app.php'; +require_once __DIR__.'/../app/Constants.php'; /* |-------------------------------------------------------------------------- | Run The Application diff --git a/routes/web.php b/routes/web.php index 77fa114091b4..edb7ada86327 100644 --- a/routes/web.php +++ b/routes/web.php @@ -412,4 +412,4 @@ if (Utils::isNinjaDev()) */ // Include static app constants -require_once app_path() . '/Constants.php'; +// require_once app_path() . '/Constants.php'; From 6a146e8fff0b9b8b90dd4fd64a0aca5f8303dc2d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 18 Dec 2021 21:06:58 +1100 Subject: [PATCH 2/2] Set account owner --- app/Http/Controllers/Migration/StepsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Migration/StepsController.php b/app/Http/Controllers/Migration/StepsController.php index ef4a89bc3121..dd168e3046bc 100644 --- a/app/Http/Controllers/Migration/StepsController.php +++ b/app/Http/Controllers/Migration/StepsController.php @@ -167,7 +167,7 @@ class StepsController extends BaseController $body = [ 'account_key' => $account->account_key, - 'email' => \Auth::user()->email, + 'email' => $account->getPrimaryUser()->email, 'plan' => $account->company->plan, 'plan_term' =>$account->company->plan_term, 'plan_started' =>$account->company->plan_started,