mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:34:33 -04:00
Improve quality of account creation
This commit is contained in:
parent
ca37cd268e
commit
120d7ed57f
@ -147,14 +147,17 @@ class AccountController extends BaseController
|
|||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ct = CompanyUser::whereUserId(auth()->user()->id);
|
$cu = CompanyUser::where('user_id', auth()->user()->id);
|
||||||
|
|
||||||
|
$company_user = $cu->first();
|
||||||
|
|
||||||
$truth = app()->make(TruthSource::class);
|
$truth = app()->make(TruthSource::class);
|
||||||
$truth->setCompanyUser($ct->first());
|
$truth->setCompanyUser($company_user);
|
||||||
$truth->setUser(auth()->user());
|
$truth->setUser($company_user->user);
|
||||||
$truth->setCompany($ct->first()->company);
|
$truth->setCompany($company_user->company);
|
||||||
|
$truth->setCompanyToken($company_user->tokens()->where('user_id', $company_user->user_id)->where('company_id', $company_user->company_id)->first());
|
||||||
|
|
||||||
return $this->listResponse($ct);
|
return $this->listResponse($cu);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(UpdateAccountRequest $request, Account $account)
|
public function update(UpdateAccountRequest $request, Account $account)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user