diff --git a/flextype/twig/GlobalVarsTwigExtension.php b/flextype/twig/GlobalVarsTwigExtension.php index 4ede5268..a2c81602 100644 --- a/flextype/twig/GlobalVarsTwigExtension.php +++ b/flextype/twig/GlobalVarsTwigExtension.php @@ -42,7 +42,8 @@ class GlobalVarsTwigExtension extends \Twig_Extension implements \Twig_Extension 'PATH_CACHE' => PATH['cache'], 'flextype_version' => FLEXTYPE_VERSION, 'registry' => $this->flextype['registry']->dump(), - 'is_logged' => ((Session::exists('role') && Session::get('role') == 'admin') ? true : false) + 'is_logged' => ((Session::exists('role') && Session::get('role') == 'admin') ? true : false), + 'username' => Session::exists('username') ? Session::get('username') : '' ]; } }