title: How to get all users using FosUserBundle?
body: <p>I am using symfony2 and FosUserBundle as a user manager. I want to display all users. I have tried the code below but it returns a blank page. </p>
  
  <p>How can I fix it?</p>
  
  <p>controller : </p>
  
  <pre><code>&lt;?php
  
  namespace Annuaire\AdminBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  
  class AdminController extends Controller {
  
      public function indexAction() {
          return $this-&gt;render('AnnuaireAdminBundle:Admin:index.html.twig');
      }
  
      //get all users
      public function usersAction() {
          //access user manager services 
  
          $userManager = $container-&gt;get('fos_user.user_manager');
          $users = $userManager-&gt;findUsers();
  
          return $this-&gt;render('AnnuaireAdminBundle:Admin:users.html.twig', array('users' =&gt;   $users));
      }
  
  }
  </code></pre>
  
  <p>twig : </p>
  
  <pre><code>&lt;h1&gt;get all users&lt;/h1&gt;
  {% for user in users %}
  &lt;li&gt;{{ user.username|e }}&lt;/li&gt;
  {% endfor %}
  </code></pre>