Fixes for Company Switcher
This commit is contained in:
parent
37842985a3
commit
e67fea2c33
2 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Reference in a new issue