I want to access the encoded password in a controller or a service.
I can access it using Twig:
{{ app.user.password }} /* prints the encoded password. */
But when I am trying it from a controller, I'll get a null result:
$user = $this->get('security.context')->getToken()->getUser();
$user->getPassword(); /* returns null */
Why can I access it using Twig, but not from the controller?