mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fix for regression
This commit is contained in:
parent
c195f5b8a5
commit
71449392de
@ -242,11 +242,14 @@ class LoginController extends BaseController
|
||||
*/
|
||||
public function refresh(Request $request)
|
||||
{
|
||||
$company_token = CompanyToken::whereRaw("BINARY `token`= ?", [$request->header('X-API-TOKEN')])
|
||||
->first();
|
||||
$company_token = CompanyToken::whereRaw("BINARY `token`= ?", [$request->header('X-API-TOKEN')])->first();
|
||||
|
||||
$cu = CompanyUser::query()
|
||||
->where('user_id', $company_token->user_id)
|
||||
->where('company_id', $company_token->company_id);
|
||||
|
||||
//$ct = CompanyUser::whereUserId(auth()->user()->id);
|
||||
return $this->refreshResponse($company_token->company_user());
|
||||
return $this->refreshResponse($cu);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user