Commit 918027c8 by Damien Moulard

WIP prevent automaticaly enabeling user at password creation #4

parent a81efc21
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Controller; namespace App\Controller;
use FOS\UserBundle\Event\FilterUserResponseEvent;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
...@@ -61,7 +62,10 @@ class ResettingController extends AbstractController ...@@ -61,7 +62,10 @@ class ResettingController extends AbstractController
$response = new RedirectResponse($this->generateUrl('fos_user_profile_show')); $response = new RedirectResponse($this->generateUrl('fos_user_profile_show'));
} }
$this->dispatcher->dispatch(new \Symfony\Component\EventDispatcher\GenericEvent($user), FOSUserEvents::RESETTING_RESET_COMPLETED); $this->eventDispatcher->dispatch(
new FilterUserResponseEvent($user, $request, $response),
FOSUserEvents::RESETTING_RESET_COMPLETED
);
return $response; return $response;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment