mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Minor fixes for contact login
This commit is contained in:
parent
2db0ea41fc
commit
293367cd16
@ -36,12 +36,9 @@ class ContactLoginController extends Controller
|
||||
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
//if we are on the root domain invoicing.co do not show any company logos
|
||||
// if(Ninja::isHosted() && count(explode('.', request()->getHost())) == 2){
|
||||
// $company = null;
|
||||
// }else
|
||||
|
||||
$company = false;
|
||||
$account = false;
|
||||
|
||||
if($request->has('company_key')){
|
||||
MultiDB::findAndSetDbByCompanyKey($request->input('company_key'));
|
||||
@ -65,13 +62,16 @@ class ContactLoginController extends Controller
|
||||
|
||||
}
|
||||
elseif (Ninja::isSelfHost()) {
|
||||
$company = Account::first()->default_company;
|
||||
$account = Account::first();
|
||||
$company = $account->default_company;
|
||||
} else {
|
||||
$company = null;
|
||||
}
|
||||
|
||||
$account_id = $request->get('account_id');
|
||||
$account = Account::find($account_id);
|
||||
if(!$account){
|
||||
$account_id = $request->get('account_id');
|
||||
$account = Account::find($account_id);
|
||||
}
|
||||
|
||||
return $this->render('auth.login', ['account' => $account, 'company' => $company]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user