1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-29 16:00:15 +02:00

Slim Framework integration #118 #117

- GlobalVars: username added
This commit is contained in:
Awilum
2019-05-31 14:04:05 +03:00
parent d1d830dd0d
commit b2035553a8

View File

@@ -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') : ''
];
}
}