| @@ 84-97 (lines=14) @@ | ||
| 81 | ||
| 82 | $form->handleRequest($request); |
|
| 83 | ||
| 84 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 85 | $this->resetPasswordHandler->handle($form->getData()); |
|
| 86 | ||
| 87 | $this->flashBag->add( |
|
| 88 | 'success', |
|
| 89 | $this->translator->trans( |
|
| 90 | 'sumocoders.multiuserbundle.flash.password_reset_success' |
|
| 91 | ) |
|
| 92 | ); |
|
| 93 | ||
| 94 | return new RedirectResponse( |
|
| 95 | $this->router->generate('multi_user_login') |
|
| 96 | ); |
|
| 97 | } |
|
| 98 | ||
| 99 | return $this->templating->renderResponse( |
|
| 100 | 'SumoCodersFrameworkMultiUserBundle:PasswordReset:reset.html.twig', |
|
| @@ 59-73 (lines=15) @@ | ||
| 56 | ||
| 57 | $form->handleRequest($request); |
|
| 58 | ||
| 59 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 60 | try { |
|
| 61 | $this->requestPasswordResetHandler->handle($form->getData()); |
|
| 62 | } catch (UserNotFound $ignore) { |
|
| 63 | } |
|
| 64 | ||
| 65 | $this->flashBag->add( |
|
| 66 | 'success', |
|
| 67 | $this->translator->trans( |
|
| 68 | 'sumocoders.multiuserbundle.flash.password_reset_request_success' |
|
| 69 | ) |
|
| 70 | ); |
|
| 71 | ||
| 72 | return new RedirectResponse($this->router->generate('multi_user_login')); |
|
| 73 | } |
|
| 74 | ||
| 75 | return $this->templating->renderResponse( |
|
| 76 | 'SumoCodersFrameworkMultiUserBundle:PasswordReset:request.html.twig', |
|