From 83da701646658f9fc2009543a9f97162f584da01 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 28 Apr 2021 13:58:37 +1000 Subject: [PATCH] Fixes for company domain --- app/Models/ClientContact.php | 2 +- app/Utils/Traits/Inviteable.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/ClientContact.php b/app/Models/ClientContact.php index d1ab21970362..767cc0308fee 100644 --- a/app/Models/ClientContact.php +++ b/app/Models/ClientContact.php @@ -257,7 +257,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference */ public function getLoginLink() { - $domain = isset($this->company->portal_domain) ?: $this->company->domain(); + $domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain(); return $domain . '/client/key_login/' . $this->contact_key; } diff --git a/app/Utils/Traits/Inviteable.php b/app/Utils/Traits/Inviteable.php index 2f40c2e60026..02e04cde8d6a 100644 --- a/app/Utils/Traits/Inviteable.php +++ b/app/Utils/Traits/Inviteable.php @@ -46,7 +46,7 @@ trait Inviteable { $entity_type = Str::snake(class_basename($this->entityType())); - $domain = isset($this->company->portal_domain) ?: $this->company->domain(); + $domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain(); switch ($this->company->portal_mode) { case 'subdomain': @@ -69,7 +69,7 @@ trait Inviteable public function getPortalLink() :string { - $domain = isset($this->company->portal_domain) ?: $this->company->domain(); + $domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain(); switch ($this->company->portal_mode) { case 'subdomain':