I use this code for getting all users in the database
$users= $this->getDoctrine()
->getRepository('AppBundle:Users')
->findAll();
return $this->render('livre/users.html.twig',array(
'users' => $users,
));
But me I want get only some fields sush as name
,email
and hide fields like password
..
Thanks.