Merge pull request #5549 from turbo124/v5-develop

Fixes for company domain
This commit is contained in:
David Bomba 2021-04-28 13:58:52 +10:00 committed by GitHub
commit 91ee9c1c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -257,7 +257,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference
*/ */
public function getLoginLink() 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; return $domain . '/client/key_login/' . $this->contact_key;
} }

View File

@ -46,7 +46,7 @@ trait Inviteable
{ {
$entity_type = Str::snake(class_basename($this->entityType())); $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) { switch ($this->company->portal_mode) {
case 'subdomain': case 'subdomain':
@ -69,7 +69,7 @@ trait Inviteable
public function getPortalLink() :string 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) { switch ($this->company->portal_mode) {
case 'subdomain': case 'subdomain':