mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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\LookupAccountToken;
|
||||||
use App\Models\LookupUser;
|
use App\Models\LookupUser;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Utils;
|
||||||
|
|
||||||
class DatabaseLookup
|
class DatabaseLookup
|
||||||
{
|
{
|
||||||
@ -46,6 +47,11 @@ class DatabaseLookup
|
|||||||
LookupContact::setServerByField('contact_key', $key);
|
LookupContact::setServerByField('contact_key', $key);
|
||||||
} elseif ($key = request()->account_key) {
|
} elseif ($key = request()->account_key) {
|
||||||
LookupAccount::setServerByField('account_key', $key);
|
LookupAccount::setServerByField('account_key', $key);
|
||||||
|
} else {
|
||||||
|
$subdomain = Utils::getSubdomain(\Request::server('HTTP_HOST'));
|
||||||
|
if ($subdomain != 'app') {
|
||||||
|
LookupAccount::setServerByField('subdomain', $subdomain);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} elseif ($guard == 'postmark') {
|
} elseif ($guard == 'postmark') {
|
||||||
LookupInvitation::setServerByField('message_id', request()->MessageID);
|
LookupInvitation::setServerByField('message_id', request()->MessageID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user