mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Use subdomain in db lookup
This commit is contained in:
parent
bf1f540fdf
commit
c8192f392b
@ -10,6 +10,7 @@ use App\Models\LookupInvitation;
|
||||
use App\Models\LookupAccountToken;
|
||||
use App\Models\LookupUser;
|
||||
use Auth;
|
||||
use Utils;
|
||||
|
||||
class DatabaseLookup
|
||||
{
|
||||
@ -46,6 +47,11 @@ class DatabaseLookup
|
||||
LookupContact::setServerByField('contact_key', $key);
|
||||
} elseif ($key = request()->account_key) {
|
||||
LookupAccount::setServerByField('account_key', $key);
|
||||
} else {
|
||||
$subdomain = Utils::getSubdomain(\Request::server('HTTP_HOST'));
|
||||
if ($subdomain != 'app') {
|
||||
LookupAccount::setServerByField('subdomain', $subdomain);
|
||||
}
|
||||
}
|
||||
} elseif ($guard == 'postmark') {
|
||||
LookupInvitation::setServerByField('message_id', request()->MessageID);
|
||||
|
Loading…
Reference in New Issue
Block a user