mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
minor fixes for contact registration
This commit is contained in:
parent
80af649f7a
commit
c6a42b2a90
@ -96,7 +96,7 @@ class ContactLoginController extends Controller
|
||||
return $this->sendLockoutResponse($request);
|
||||
}
|
||||
|
||||
if(Ninja::isHosted() && $company = Company::where('company_key', $request->input('company_key'))->first()){
|
||||
if(Ninja::isHosted() && $request->has('password') && $company = Company::where('company_key', $request->input('company_key'))->first()){
|
||||
|
||||
$contact = ClientContact::where(['email' => $request->input('email'), 'company_id' => $company->id])->first();
|
||||
|
||||
@ -132,7 +132,6 @@ class ContactLoginController extends Controller
|
||||
|
||||
public function authenticated(Request $request, ClientContact $client)
|
||||
{
|
||||
// Auth::guard('contact')->loginUsingId($client->id, true);
|
||||
auth()->guard('contact')->loginUsingId($client->id, true);
|
||||
|
||||
event(new ContactLoggedIn($client, $client->company, Ninja::eventVars()));
|
||||
|
@ -37,15 +37,14 @@ class ContactRegister
|
||||
if(! $company->client_can_register)
|
||||
abort(400, 'Registration disabled');
|
||||
|
||||
// $request->merge(['key' => $company->company_key]);
|
||||
session()->put('key', $company->company_key);
|
||||
session()->put('key', $company->company_key);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$query = [
|
||||
$query = [
|
||||
'portal_domain' => $request->getSchemeAndHttpHost(),
|
||||
'portal_mode' => 'domain',
|
||||
];
|
||||
|
@ -11,6 +11,10 @@
|
||||
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
|
||||
|
||||
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{ more: false }">
|
||||
@if($company)
|
||||
<input type="hidden" name="company_key" value="{{ $company->company_key }}">
|
||||
@endif
|
||||
|
||||
@csrf
|
||||
|
||||
<div class="grid grid-cols-12 gap-4 mt-10">
|
||||
|
Loading…
x
Reference in New Issue
Block a user