public function handleDeleteForm(User $user, Request $request, UserRepository $userRepo)
 {
     $builder = $this->createFormBuilder();
     $builder->add('current_password', 'password', array('label' => 'form.current_password', 'translation_domain' => 'FOSUserBundle', 'mapped' => false, 'constraints' => new UserPassword()));
     $form = $builder->getForm();
     $form->handleRequest($request);
     if ($form->isValid()) {
         $user->setEnabled(false);
         $user->setStatus(User::STATUS_DISABLED_USER);
         /** @var $userManager \FOS\UserBundle\Model\UserManagerInterface */
         $userManager = $this->container->get('fos_user.user_manager');
         $userManager->updateUser($user);
         $body = $this->renderView('GotChosenSiteBundle:Emails:disabled_user.txt.twig', array('user' => $user));
         $msg = \Swift_Message::newInstance()->setSubject('GotChosen: User account for e-mail "' . $user->getEmail() . '" has been cancelled')->setFrom('*****@*****.**', 'GotChosen')->setTo($user->getEmail())->setBody($body);
         $this->mailer()->send($msg);
         $this->get('security.context')->setToken(null);
         $this->get('request')->getSession()->invalidate();
         $response = $this->redirectRoute('fos_user_security_login');
         $dispatcher = $this->get('event_dispatcher');
         $dispatcher->dispatch(GCSiteEvents::USER_ACCOUNT_DISABLED, new FilterUserResponseEvent($user, $request, $response));
         $this->flash('info', 'Your account has been deleted.');
         return $response;
     }
     return $form;
 }