mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 07:54:35 -04:00
Minor fixes for Contact login
This commit is contained in:
parent
1dfc6eb11a
commit
3d319f1b1d
@ -41,7 +41,16 @@ class ContactLoginController extends Controller
|
|||||||
// $company = null;
|
// $company = null;
|
||||||
// }else
|
// }else
|
||||||
|
|
||||||
if (strpos($request->getHost(), 'invoicing.co') !== false) {
|
$company = false;
|
||||||
|
|
||||||
|
if($request->has('company_key')){
|
||||||
|
MultiDB::findAndSetDbByCompanyKey($request->input('company_key'));
|
||||||
|
|
||||||
|
$company = Company::where('company_key', $request->input('company_key'))->first();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$company && strpos($request->getHost(), 'invoicing.co') !== false) {
|
||||||
$subdomain = explode('.', $request->getHost())[0];
|
$subdomain = explode('.', $request->getHost())[0];
|
||||||
|
|
||||||
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user