]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/SecurityController.php
Merge pull request #1384 from wallabag/v2-fix-config-display
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / SecurityController.php
index 5007307afcafa26dbab50ec6082e79036a5314ca..f0a7ab6d8dd5126bd1dcdbd039b19b9334a2fbb0 100644 (file)
@@ -25,14 +25,15 @@ class SecurityController extends Controller
         return $this->render('WallabagCoreBundle:Security:login.html.twig', array(
             // last username entered by the user
             'last_username' => $session->get(SecurityContext::LAST_USERNAME),
-            'error'         => $error,
+            'error' => $error,
         ));
     }
 
     /**
-     * Request forgot password: show form
+     * Request forgot password: show form.
      *
      * @Route("/forgot-password", name="forgot_password")
+     *
      * @Method({"GET", "POST"})
      */
     public function forgotPasswordAction(Request $request)
@@ -73,9 +74,10 @@ class SecurityController extends Controller
     }
 
     /**
-     * Tell the user to check his email provider
+     * Tell the user to check his email provider.
      *
      * @Route("/forgot-password/check-email", name="forgot_password_check_email")
+     *
      * @Method({"GET"})
      */
     public function checkEmailAction(Request $request)
@@ -93,9 +95,10 @@ class SecurityController extends Controller
     }
 
     /**
-     * Reset user password
+     * Reset user password.
      *
      * @Route("/forgot-password/{token}", name="forgot_password_reset")
+     *
      * @Method({"GET", "POST"})
      */
     public function resetAction(Request $request, $token)
@@ -103,7 +106,7 @@ class SecurityController extends Controller
         $user = $this->getDoctrine()->getRepository('WallabagCoreBundle:User')->findOneByConfirmationToken($token);
 
         if (null === $user) {
-            $this->createNotFoundException(sprintf('No user found with token "%s"', $token));
+            throw $this->createNotFoundException(sprintf('No user found with token "%s"', $token));
         }
 
         $form = $this->createForm(new ResetPasswordType());