mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-05 01:01:30 +02:00
Added registrar impersonation, fixed #155
This commit is contained in:
parent
34d966aeeb
commit
4d8239afc7
5 changed files with 26 additions and 0 deletions
|
@ -159,6 +159,10 @@ $container->set('view', function ($container) {
|
|||
$currency = isset($_SESSION['_currency']) ? $_SESSION['_currency'] : 'USD';
|
||||
$view->getEnvironment()->addGlobal('currency', $currency);
|
||||
|
||||
// Check if the user is impersonated from the admin, otherwise default to false
|
||||
$isAdminImpersonation = isset($_SESSION['impersonator']) ? $_SESSION['impersonator'] : false;
|
||||
$view->getEnvironment()->addGlobal('isAdminImpersonation', $isAdminImpersonation);
|
||||
|
||||
$translateFunction = new TwigFunction('__', function ($text) use ($translations) {
|
||||
// Find the translation
|
||||
$translation = $translations->find(null, $text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue