mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-11 09:25:25 +00:00
Proper parameter name, simplify logic & phpdoc
This commit is contained in:
parent
de3d716ae4
commit
7149aa5781
3 changed files with 7 additions and 6 deletions
|
@ -51,7 +51,7 @@ wallabag_core:
|
||||||
reading_speed: 1
|
reading_speed: 1
|
||||||
|
|
||||||
wallabag_user:
|
wallabag_user:
|
||||||
registration_enabled: "%registration_enabled%"
|
registration_enabled: "%fosuser_registration%"
|
||||||
|
|
||||||
wallabag_import:
|
wallabag_import:
|
||||||
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain']
|
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain']
|
||||||
|
|
|
@ -10,11 +10,9 @@ class RegistrationController extends FOSRegistrationController
|
||||||
public function registerAction(Request $request)
|
public function registerAction(Request $request)
|
||||||
{
|
{
|
||||||
if ($this->container->getParameter('wallabag_user.registration_enabled')) {
|
if ($this->container->getParameter('wallabag_user.registration_enabled')) {
|
||||||
parent::registerAction($request);
|
return parent::registerAction($request);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return $this->redirectToRoute('fos_user_security_login', array(), 301);
|
return $this->redirectToRoute('fos_user_security_login', array(), 301);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@ namespace Wallabag\UserBundle\Controller;
|
||||||
|
|
||||||
use FOS\UserBundle\Controller\SecurityController as FOSSecurityController;
|
use FOS\UserBundle\Controller\SecurityController as FOSSecurityController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extends login form in order to pass the registration_enabled parameter.
|
||||||
|
*/
|
||||||
class SecurityController extends FOSSecurityController
|
class SecurityController extends FOSSecurityController
|
||||||
{
|
{
|
||||||
protected function renderLogin(array $data)
|
protected function renderLogin(array $data)
|
||||||
|
|
Loading…
Reference in a new issue