mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for Company Switcher
This commit is contained in:
parent
37842985a3
commit
e67fea2c33
@ -81,8 +81,8 @@ class ContactLoginController extends Controller
|
||||
{
|
||||
Auth::shouldUse('contact');
|
||||
|
||||
if(Ninja::isHosted() && $request->has('db'))
|
||||
MultiDB::setDb($request->input('db'));
|
||||
if(Ninja::isHosted() && $request->has('company_key'))
|
||||
MultiDB::findAndSetDbByCompanyKey($request->input('company_key'));
|
||||
|
||||
$this->validateLogin($request);
|
||||
// If the class is using the ThrottlesLogins trait, we can automatically throttle
|
||||
|
@ -27,7 +27,7 @@ class SwitchCompanyController extends Controller
|
||||
->where('id', $this->transformKeys($contact))
|
||||
->first();
|
||||
|
||||
auth()->guard('contact')->user()->login($client_contact, true);
|
||||
auth()->guard('contact')->login($client_contact, true);
|
||||
|
||||
return redirect('/client/dashboard');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user