mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-18 18:10:07 +01:00
Handle default value for new user
This commit is contained in:
parent
e4977b8a86
commit
0bd2cb1ecd
@ -37,5 +37,7 @@ parameters:
|
|||||||
export_mobi: true
|
export_mobi: true
|
||||||
export_pdf: true
|
export_pdf: true
|
||||||
|
|
||||||
# List view
|
# default user config
|
||||||
items_on_page: 12
|
items_on_page: 12
|
||||||
|
theme: baggy
|
||||||
|
language: en_US
|
||||||
|
@ -135,11 +135,10 @@ class InstallCommand extends ContainerAwareCommand
|
|||||||
|
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$config = new Config();
|
$config = new Config($user);
|
||||||
$config->setUser($user);
|
$config->setTheme($this->getContainer()->getParameter('theme'));
|
||||||
$config->setTheme('baggy');
|
$config->setItemsPerPage($this->getContainer()->getParameter('items_on_page'));
|
||||||
$config->setItemsPerPage(10);
|
$config->setLanguage($this->getContainer()->getParameter('language'));
|
||||||
$config->setLanguage('en_US');
|
|
||||||
|
|
||||||
$em->persist($config);
|
$em->persist($config);
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,14 @@ class ConfigController extends Controller
|
|||||||
|
|
||||||
if ($newUserForm->isValid()) {
|
if ($newUserForm->isValid()) {
|
||||||
$em->persist($newUser);
|
$em->persist($newUser);
|
||||||
|
|
||||||
|
$config = new Config($newUser);
|
||||||
|
$config->setTheme($this->container->getParameter('theme'));
|
||||||
|
$config->setItemsPerPage($this->container->getParameter('items_on_page'));
|
||||||
|
$config->setLanguage($this->container->getParameter('language'));
|
||||||
|
|
||||||
|
$em->persist($config);
|
||||||
|
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
$this->get('session')->getFlashBag()->add(
|
$this->get('session')->getFlashBag()->add(
|
||||||
|
Loading…
Reference in New Issue
Block a user