aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/config/config.yml2
-rw-r--r--src/Wallabag/UserBundle/Controller/RegistrationController.php8
-rw-r--r--src/Wallabag/UserBundle/Controller/SecurityController.php3
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
53wallabag_user: 53wallabag_user:
54 registration_enabled: "%registration_enabled%" 54 registration_enabled: "%fosuser_registration%"
55 55
56wallabag_import: 56wallabag_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
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)