Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Show the user
- */
- public function showAction(Request $request)
- {
- $user = $this->get('security.context')->getToken()->getUser();
- $formProfil = $this->get('form.factory')->create(new ProfileFormType, $user);
- $formProfil->handleRequest($request);
- if($formProfil->isValid()){
- $em = $this->getDoctrine()->getManager();
- $repository = $em->getRepository('WIYUserBundle:User');
- $user->setUpdatedOn(new \DateTime());
- $em->flush();
- $session = new Session();
- $session->getFlashBag()->add('notice', 'La mise a jour de vos informations personnelles a été effectuée.');
- }
- return $this->render('WIYUserBundle:Profile:show.html.twig', array(
- 'user' => $user,
- 'formProfil' => $formProfil->createView()
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement