Use fosuser_registration directly instead of wallabag_user.registration_enabled

This commit is contained in:
Yassine Guedidi
2022-05-05 23:39:26 +02:00
parent 935070f2a5
commit 5a55a64fee
6 changed files with 3 additions and 15 deletions

View File

@ -9,7 +9,7 @@ class RegistrationController extends FOSRegistrationController
{
public function registerAction(Request $request)
{
if ($this->container->getParameter('wallabag_user.registration_enabled')) {
if ($this->container->getParameter('fosuser_registration')) {
return parent::registerAction($request);
}

View File

@ -14,7 +14,7 @@ class SecurityController extends FOSSecurityController
return $this->render('FOSUserBundle:Security:login.html.twig',
array_merge(
$data,
['registration_enabled' => $this->container->getParameter('wallabag_user.registration_enabled')]
['registration_enabled' => $this->container->getParameter('fosuser_registration')]
)
);
}

View File

@ -12,14 +12,6 @@ class Configuration implements ConfigurationInterface
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('wallabag_user');
$rootNode
->children()
->booleanNode('registration_enabled')
->defaultValue(true)
->end()
->end()
;
return $treeBuilder;
}
}

View File

@ -16,7 +16,6 @@ class WallabagUserExtension extends Extension
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
$container->setParameter('wallabag_user.registration_enabled', $config['registration_enabled']);
}
public function getAlias()