1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 15:42:51 +01:00

Fixes for login

This commit is contained in:
David Bomba 2021-06-08 18:42:37 +10:00
parent 2f3ab6dac2
commit 5d04ab724b

View File

@ -214,7 +214,7 @@ class LoginController extends BaseController
return response()->json(['message' => 'User not linked to any companies'], 403);
/* Ensure the user has a valid token */
$user->company_users->each(function ($company_user){
$user->company_users->each(function ($company_user) use($request){
if($company_user->tokens->count() == 0){
CreateCompanyToken::dispatchNow($company_user->company, $company_user->user, $request->server('HTTP_USER_AGENT'));