Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
fail safe event handling for empty user (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst authored Jul 15, 2018
1 parent 2901667 commit 8fe243a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/NavbarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
[
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8fe243a

Please sign in to comment.