From 6d07806a0ae8ede2173cd65999e2cf0470a0019a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 5 Oct 2019 20:07:45 +0200 Subject: [PATCH] Fix profile loading and style --- Controller/BackendController.php | 2 +- Models/NullProfile.php | 2 +- Theme/Backend/profile-single.tpl.php | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index c01a307..bf25db1 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -103,7 +103,7 @@ final class BackendController extends Controller $calendarView->setTemplate('/Modules/Calendar/Theme/Backend/Components/Calendar/mini'); $view->addData('calendar', $calendarView); - $view->setData('account', ProfileMapper::getFor((int) $request->getData('id'), 'account')); + $view->setData('account', ProfileMapper::get((int) $request->getData('id'))); $accGrpSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app, $request, $response); $view->addData('accGrpSelector', $accGrpSelector); diff --git a/Models/NullProfile.php b/Models/NullProfile.php index 2e77182..2d9bff6 100644 --- a/Models/NullProfile.php +++ b/Models/NullProfile.php @@ -22,6 +22,6 @@ namespace Modules\Profile\Models; * @link https://orange-management.org * @since 1.0.0 */ -class NullProfile extends Profile +final class NullProfile extends Profile { } diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php index 577c0d7..7296007 100644 --- a/Theme/Backend/profile-single.tpl.php +++ b/Theme/Backend/profile-single.tpl.php @@ -16,8 +16,7 @@ use phpOMS\Uri\UriFactory; /** * @var \phpOMS\Views\View $this */ -$account = $this->getData('account'); - +$account = $this->getData('account'); $settings = $this->getData('settings') ?? []; $countries = \phpOMS\Localization\ISO3166NameEnum::getConstants(); @@ -66,7 +65,10 @@ echo $this->getData('nav')->render(); <?= $this->getHtml('ProfileImage'); ?>