/**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $adminUser = new User();
     $profil = new Profil();
     $adminUser->setUsername('jules');
     $adminUser->setPrenom('Souleymane');
     $adminUser->setNom('MBAYE');
     $adminUser->setEmail('*****@*****.**');
     $profil->setLibelle("ADMIN");
     $adminUser->addProfil($profil);
     $manager->persist($adminUser);
     $manager->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $adminUser = new User();
     $profil = new Profil();
     $adminUser->setUsername('jules');
     $adminUser->setPrenom('Souleymane');
     $adminUser->setNom('MBAYE');
     $adminUser->setEmail('*****@*****.**');
     $profil->setLibelle("ADMIN");
     $adminUser->addProfil($profil);
     $encoder = $this->container->get('security.encoder_factory')->getEncoder($adminUser);
     $adminUser->setPassword($encoder->encodePassword('diama', $adminUser->getSalt()));
     $manager->persist($adminUser);
     $manager->flush();
 }
 public function indexAction()
 {
     //on recupère la liste de tous les utilisateurs
     $listUtilisateurs = User::listUtilisateurs($this);
     return $this->render("SMBUserBundle:User:index.html.twig", array('listUtilisateurs' => $listUtilisateurs));
 }