mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-23 08:06:33 +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
|
||||
|
||||
wallabag_user:
|
||||
registration_enabled: "%registration_enabled%"
|
||||
registration_enabled: "%fosuser_registration%"
|
||||
|
||||
wallabag_import:
|
||||
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain']
|
||||
|
|
|
@ -10,11 +10,9 @@ class RegistrationController extends FOSRegistrationController
|
|||
public function registerAction(Request $request)
|
||||
{
|
||||
if ($this->container->getParameter('wallabag_user.registration_enabled')) {
|
||||
parent::registerAction($request);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->redirectToRoute('fos_user_security_login', array(), 301);
|
||||
return parent::registerAction($request);
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('fos_user_security_login', array(), 301);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@ namespace Wallabag\UserBundle\Controller;
|
|||
|
||||
use FOS\UserBundle\Controller\SecurityController as FOSSecurityController;
|
||||
|
||||
/**
|
||||
* Extends login form in order to pass the registration_enabled parameter.
|
||||
*/
|
||||
class SecurityController extends FOSSecurityController
|
||||
{
|
||||
protected function renderLogin(array $data)
|
||||
|
|
Loading…
Reference in a new issue