1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #6218 from turbo124/v5-develop

Fixes for contact login logo for custom domains
This commit is contained in:
David Bomba 2021-07-07 12:55:39 +10:00 committed by GitHub
commit a38aa296a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,10 @@ class ContactLoginController extends Controller
}elseif (strpos($request->getHost(), 'invoicing.co') !== false) {
$subdomain = explode('.', $request->getHost())[0];
$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;
} else {
$company = null;