diff options
-rw-r--r-- | app/config/config.yml | 2 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Controller/RegistrationController.php | 8 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Controller/SecurityController.php | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index cad51e6c..30fd6063 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -51,7 +51,7 @@ wallabag_core: | |||
51 | reading_speed: 1 | 51 | reading_speed: 1 |
52 | 52 | ||
53 | wallabag_user: | 53 | wallabag_user: |
54 | registration_enabled: "%registration_enabled%" | 54 | registration_enabled: "%fosuser_registration%" |
55 | 55 | ||
56 | wallabag_import: | 56 | wallabag_import: |
57 | allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain'] | 57 | allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain'] |
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 | ||
5 | use FOS\UserBundle\Controller\SecurityController as FOSSecurityController; | 5 | use FOS\UserBundle\Controller\SecurityController as FOSSecurityController; |
6 | 6 | ||
7 | /** | ||
8 | * Extends login form in order to pass the registration_enabled parameter. | ||
9 | */ | ||
7 | class SecurityController extends FOSSecurityController | 10 | class SecurityController extends FOSSecurityController |
8 | { | 11 | { |
9 | protected function renderLogin(array $data) | 12 | protected function renderLogin(array $data) |