我正在尝试在我的树枝模板中显示登录用户的用户名.
原文链接:https://www.f2er.com/php/138872.html$token = new UsernamePasswordToken($user->getUsername(),$user->getPassword(),"secured_area",$user->getRoles()); $this->get("security.context")->setToken($token); $session->set('_security_secured_area',serialize($token));
我想提出类似的东西:
<div class='Meta'>Logged in as <b>username_here</b>
在我的模板顶部.