Fix FLEXIAPI-340 Fix the space resolution when getting the realm on Accounts

This commit is contained in:
Timothée Jaussoin 2025-06-30 15:49:56 +02:00
parent cb5afe3343
commit e50aeefbfa
2 changed files with 4 additions and 2 deletions

View file

@ -54,6 +54,8 @@ v2.0
- Fix FLEXIAPI-336 Fix broken ph icons
- Fix FLEXIAPI-333 Remove HTML buttons because they cannot be rendered in "old" Outlook versions
- Fix FLEXIAPI-337 Generate the provisioning URLs based on the user space
- Fix FLEXIAPI-326 Rework email templates and translations
- Fix FLEXIAPI-340 Fix the space resolution when getting the realm on Accounts
v1.6
----

View file

@ -322,12 +322,12 @@ class Account extends Authenticatable
public function getRealmAttribute()
{
return space()?->account_realm;
return $this->space->account_realm;
}
public function getResolvedRealmAttribute()
{
return space()?->account_realm ?? $this->domain;
return $this->space->account_realm ?? $this->domain;
}
public function getConfirmationKeyExpiresAttribute()