$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);