Tutorial 2 : Login Application using Symfony2 Unknown الأحد، 12 أبريل 2015 label symfony HiIn this tutorial about Login Application using Symfony2The controllerrender('DWMUserBundle:Default:index.html.twig', array('name' => $name)); } public function SigninAction(Request $request) { $em=$this->getDoctrine()->getManager(); $repository =$em->getRepository('DWMUserBundle:User'); if($request->getMethod()=='POST') { $email=$request->get('email'); $password=$request->get('password'); $user=$repository->findOneBy(array('email'=>$email,'password'=>$password)); if ($user) //if user has values return $this->render('DWMUserBundle:Default:home.html.twig', array('user' => $user)); else//if login is incorrect return $this->render('DWMUserBundle:Default:signin.html.twig'); } return $this->render('DWMUserBundle:Default:signin.html.twig'); } } Share This : Unknown chevron_left chevron_right
comment 0 التعليقات:
more_vertsentiment_satisfied Emoticon