1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Login Controller cleanup

This commit is contained in:
David Bomba 2021-12-11 20:29:03 +11:00
parent d80d440ca3
commit 107ec59ebe

View File

@ -236,15 +236,6 @@ class LoginController extends BaseController
} }
//method above override this
// $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'));
// }
// });
/*On the hosted platform, only owners can login for free/pro accounts*/ /*On the hosted platform, only owners can login for free/pro accounts*/
if(Ninja::isHosted() && !$cu->first()->is_owner && !$user->account->isEnterpriseClient()) if(Ninja::isHosted() && !$cu->first()->is_owner && !$user->account->isEnterpriseClient())
return response()->json(['message' => 'Pro / Free accounts only the owner can log in. Please upgrade'], 403); return response()->json(['message' => 'Pro / Free accounts only the owner can log in. Please upgrade'], 403);