aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/UserBundle/Controller/RegistrationController.php8
-rw-r--r--src/Wallabag/UserBundle/Controller/SecurityController.php3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Wallabag/UserBundle/Controller/RegistrationController.php b/src/Wallabag/UserBundle/Controller/RegistrationController.php
index bba27cfb..d6d0fda1 100644
--- a/src/Wallabag/UserBundle/Controller/RegistrationController.php
+++ b/src/Wallabag/UserBundle/Controller/RegistrationController.php
@@ -10,11 +10,9 @@ class RegistrationController extends FOSRegistrationController
10 public function registerAction(Request $request) 10 public function registerAction(Request $request)
11 { 11 {
12 if ($this->container->getParameter('wallabag_user.registration_enabled')) { 12 if ($this->container->getParameter('wallabag_user.registration_enabled')) {
13 parent::registerAction($request); 13 return parent::registerAction($request);
14 }
15 else
16 {
17 return $this->redirectToRoute('fos_user_security_login', array(), 301);
18 } 14 }
15
16 return $this->redirectToRoute('fos_user_security_login', array(), 301);
19 } 17 }
20} 18}
diff --git a/src/Wallabag/UserBundle/Controller/SecurityController.php b/src/Wallabag/UserBundle/Controller/SecurityController.php
index a5f93763..1e752b6d 100644
--- a/src/Wallabag/UserBundle/Controller/SecurityController.php
+++ b/src/Wallabag/UserBundle/Controller/SecurityController.php
@@ -4,6 +4,9 @@ namespace Wallabag\UserBundle\Controller;
4 4
5use FOS\UserBundle\Controller\SecurityController as FOSSecurityController; 5use FOS\UserBundle\Controller\SecurityController as FOSSecurityController;
6 6
7/**
8 * Extends login form in order to pass the registration_enabled parameter.
9 */
7class SecurityController extends FOSSecurityController 10class SecurityController extends FOSSecurityController
8{ 11{
9 protected function renderLogin(array $data) 12 protected function renderLogin(array $data)