In twig: {{ app.session.varname }}
{{ app.session.varname }}
In PHP: echo $app->getSession()->get('uid');
echo $app->getSession()->get('uid');
$session = $this->get('session');if ($session->has('varname')) { echo $session->varname}
have you tried to error_log $app->getSession() to see what it returns?
error_log(var_dump($app->getSession(), true));