1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 17:01:33 +02:00

Add with trasheD

This commit is contained in:
David Bomba 2021-03-25 15:37:32 +11:00
parent 2ab62a821e
commit 07eb89acfe

View File

@ -612,7 +612,9 @@ class UserController extends BaseController
return response()->json(['message', 'Cannot detach owner.'],400); return response()->json(['message', 'Cannot detach owner.'],400);
$company_user = CompanyUser::whereUserId($user->id) $company_user = CompanyUser::whereUserId($user->id)
->whereCompanyId(auth()->user()->companyId())->first(); ->whereCompanyId(auth()->user()->companyId())
->withTrashed()
->first();
$token = $company_user->token->where('company_id', $company_user->company_id)->where('user_id', $company_user->user_id)->first(); $token = $company_user->token->where('company_id', $company_user->company_id)->where('user_id', $company_user->user_id)->first();