mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 09:04:34 -04:00
Fixes for client portal login
This commit is contained in:
parent
a7f1203578
commit
5c609f91f1
@ -45,7 +45,7 @@ class ContactLoginController extends Controller
|
|||||||
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
||||||
|
|
||||||
$company = Company::where('subdomain', $subdomain)->first();
|
$company = Company::where('subdomain', $subdomain)->first();
|
||||||
|
|
||||||
} elseif(Ninja::isHosted()){
|
} elseif(Ninja::isHosted()){
|
||||||
|
|
||||||
MultiDB::findAndSetDbByDomain(['portal_domain' => $request->getSchemeAndHttpHost()]);
|
MultiDB::findAndSetDbByDomain(['portal_domain' => $request->getSchemeAndHttpHost()]);
|
||||||
@ -70,6 +70,9 @@ class ContactLoginController extends Controller
|
|||||||
{
|
{
|
||||||
Auth::shouldUse('contact');
|
Auth::shouldUse('contact');
|
||||||
|
|
||||||
|
if(Ninja::isHosted() && $request->has('db'))
|
||||||
|
MultiDB::setDb($request->input('db'));
|
||||||
|
|
||||||
$this->validateLogin($request);
|
$this->validateLogin($request);
|
||||||
// If the class is using the ThrottlesLogins trait, we can automatically throttle
|
// If the class is using the ThrottlesLogins trait, we can automatically throttle
|
||||||
// the login attempts for this application. We'll key this by the username and
|
// the login attempts for this application. We'll key this by the username and
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
<a class="text-xs text-gray-600 hover:text-gray-800 ease-in duration-100"
|
<a class="text-xs text-gray-600 hover:text-gray-800 ease-in duration-100"
|
||||||
href="{{ route('client.password.request') }}">{{ trans('texts.forgot_password') }}</a>
|
href="{{ route('client.password.request') }}">{{ trans('texts.forgot_password') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@if($company)
|
||||||
|
<input type="hidden" name="db" value="{{$company->db}}">
|
||||||
|
@endif
|
||||||
<input type="password" name="password" id="password"
|
<input type="password" name="password" id="password"
|
||||||
class="input"
|
class="input"
|
||||||
autofocus>
|
autofocus>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user