aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-07-24 11:41:04 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-08-23 07:40:36 +0200
commit7149aa57814a9d6151f4fe049126e3cb5d86a254 (patch)
treeb2aea48731de289461d0c24777814f115538181d /src/Wallabag/UserBundle
parentde3d716ae4e8ca98dabdcb2ec9c18219e05856f7 (diff)
downloadwallabag-7149aa57814a9d6151f4fe049126e3cb5d86a254.tar.gz
wallabag-7149aa57814a9d6151f4fe049126e3cb5d86a254.tar.zst
wallabag-7149aa57814a9d6151f4fe049126e3cb5d86a254.zip
Proper parameter name, simplify logic & phpdoc
Diffstat (limited to 'src/Wallabag/UserBundle')
-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)