Question : get user symfony
Answered by : repulsive-ratel-9dj5vgih2ysa
$user = $this->get('security.token_storage')->getToken()->getUser();
$user->getUsername();
Source : https://stackoverflow.com/questions/7680917/how-do-i-get-the-entity-that-represents-the-current-user-in-symfony2 | Last Update : Wed, 16 Jun 21
Question : get current user in symfony
Answered by : bewildered-beetle-ezgglnix2ocn
$user = $this->get('security.token_storage')->getToken()->getUser();
$user->getUsername();
Source : | Last Update : Sat, 25 Jun 22