Use subdomain in db lookup
This commit is contained in:
parent
bf1f540fdf
commit
c8192f392b
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue