From b2035553a8411bc6ce5447c1c2399002bde9d644 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 31 May 2019 14:04:05 +0300 Subject: [PATCH] Slim Framework integration #118 #117 - GlobalVars: username added --- flextype/twig/GlobalVarsTwigExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') : '' ]; } }