mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Return early
This commit is contained in:
parent
8dcdccb9c7
commit
31ef397dba
@ -27,7 +27,7 @@ class SwitchCompanyController extends Controller
|
|||||||
->where('id', $this->transformKeys($contact))
|
->where('id', $this->transformKeys($contact))
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
Auth::guard('contact')->login($client_contact, true);
|
auth()->guard('contact')->user()->login($client_contact, true);
|
||||||
|
|
||||||
return redirect('/client/dashboard');
|
return redirect('/client/dashboard');
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,9 @@ class EntityViewedObject
|
|||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(!$this->entity)
|
||||||
|
return;
|
||||||
|
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
/* Init a new copy of the translator*/
|
/* Init a new copy of the translator*/
|
||||||
$t = app('translator');
|
$t = app('translator');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user