zikula / core

Zikula Core Framework
GNU Lesser General Public License v3.0
238 stars 66 forks source link

Provide user name to loggable listener #3570

Closed Guite closed 7 years ago

Guite commented 7 years ago
            $currentUserApi = $container->get('zikula_users_module.current_user');
            $userName = $currentUserApi->isLoggedIn() ? $currentUserApi->get('uname') : __('Guest');

            // set current user name to loggable listener
            $loggableListener = $container->get('doctrine_extensions.listener.loggable');
            $loggableListener->setUsername($userName);
Guite commented 7 years ago

Afterwards remove from https://github.com/Guite/MostGenerator/blob/master/bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/smallstuff/Bootstrap.xtend#L55