diff options
Diffstat (limited to 'src/Wallabag/UserBundle/Controller/RegistrationController.php')
-rw-r--r-- | src/Wallabag/UserBundle/Controller/RegistrationController.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Controller/RegistrationController.php b/src/Wallabag/UserBundle/Controller/RegistrationController.php new file mode 100644 index 00000000..f81f3a7b --- /dev/null +++ b/src/Wallabag/UserBundle/Controller/RegistrationController.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Controller; | ||
4 | |||
5 | use FOS\UserBundle\Controller\RegistrationController as FOSRegistrationController; | ||
6 | use Symfony\Component\HttpFoundation\Request; | ||
7 | |||
8 | class RegistrationController extends FOSRegistrationController | ||
9 | { | ||
10 | public function registerAction(Request $request) | ||
11 | { | ||
12 | if ($this->container->getParameter('wallabag_user.registration_enabled')) { | ||
13 | return parent::registerAction($request); | ||
14 | } | ||
15 | |||
16 | return $this->redirectToRoute('fos_user_security_login', [], 301); | ||
17 | } | ||
18 | } | ||