1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Fixes for contact login logo for custom domains

This commit is contained in:
David Bomba 2021-07-07 12:54:59 +10:00
parent 7def9c154b
commit a1b7a795e0

View File

@ -41,7 +41,10 @@ class ContactLoginController extends Controller
}elseif (strpos($request->getHost(), 'invoicing.co') !== false) { }elseif (strpos($request->getHost(), 'invoicing.co') !== false) {
$subdomain = explode('.', $request->getHost())[0]; $subdomain = explode('.', $request->getHost())[0];
$company = Company::where('subdomain', $subdomain)->first(); $company = Company::where('subdomain', $subdomain)->first();
} elseif (Ninja::isSelfHost()) { } elseif(Ninja::isHosted() && $company = Company::where('portal_domain', $request->getSchemeAndHttpHost())->first()){
}
elseif (Ninja::isSelfHost()) {
$company = Account::first()->default_company; $company = Account::first()->default_company;
} else { } else {
$company = null; $company = null;