From 8fe243abe5361e18d40a9bd539262bcc631665ad Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sun, 15 Jul 2018 22:02:38 +0200 Subject: [PATCH] fail safe event handling for empty user (#3) --- Controller/NavbarController.php | 2 +- README.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Controller/NavbarController.php b/Controller/NavbarController.php index b847297..f93ef76 100644 --- a/Controller/NavbarController.php +++ b/Controller/NavbarController.php @@ -107,7 +107,7 @@ public function userAction() /** @var ShowUserEvent $userEvent */ $userEvent = $this->triggerMethod(ThemeEvents::THEME_NAVBAR_USER, new ShowUserEvent()); - if ($userEvent instanceof ShowUserEvent) { + if ($userEvent instanceof ShowUserEvent && null !== $userEvent->getUser()) { return $this->render( '@AdminLTE/Navbar/user.html.twig', [ diff --git a/README.md b/README.md index a641aca..da6f1bf 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,18 @@ This repository is an upgraded version of the AvanzuAdminThemeBundle, bringing t Go ahead and [read the full documentation](Resources/docs/), then install and enjoy your new theme! +## Features + +Some of the main features of this theme bundle: + +- Two main layouts for main application and security (login, forgot password, register account...) +- Support for Symfony 4.x +- Support for KNPMenuBundle +- Support for FOSUserBundle +- Webpack-Encore support for building assets +- Event-driven handling of menu entries, tasks and notifications +- Translations for english and german (please help translating it to more languages) + ## Installation with Symfony Flex Installation using Symfony flex is the recommended way: @@ -71,6 +83,7 @@ This branch was split of the original master but with the following PRs merged o And a lot of other changes which I added in this repository: +- added support for [FOSUserBundle](Resources/docs/fos_userbundle.md) - replaced AliasRouting with simpler version - changed namespaces to allow co-existence with AdminThemeBundle - changed and extended default configuration