diff --git a/Models/Profile.php b/Models/Profile.php index 50b2cce..dd50d31 100644 --- a/Models/Profile.php +++ b/Models/Profile.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Modules\Profile\Models; use Modules\Admin\Models\Account; +use Modules\Admin\Models\NullAccount; use Modules\Media\Models\Media; use Modules\Media\Models\NullMedia; @@ -78,7 +79,7 @@ class Profile public function getAccount() : Account { - return $this->account; + return $this->account ?? new NullAccount(); } public function setBirthday(\DateTime $birthday) /* : void */ diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php index 7043272..ddcfe98 100644 --- a/Theme/Backend/profile-single.tpl.php +++ b/Theme/Backend/profile-single.tpl.php @@ -29,13 +29,12 @@ echo $this->getData('nav')->render();
+
= $this->getHtml('Name') ?>
- | = $this->printHtml($account->getAccount()->getName3()); ?>, = $this->printHtml($account->getAccount()->getName1()); ?> |
|---|---|
| = $this->getHtml('Occupation') ?> | Sailor |