aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/InstallCommand.php
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-10-06 09:19:06 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-10-06 09:19:06 +0200
commit16dabc326311f084d671be188c7941bbb3c341c9 (patch)
tree3210a7688ea2bfa1bff5fd0422b52adf570edcdc /src/Wallabag/CoreBundle/Command/InstallCommand.php
parentfdef5f460524215d806e244e5546865f4b8e01df (diff)
parent8263e71192989dc0fd28a41ac22f9c5b32eb11c4 (diff)
downloadwallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.gz
wallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.zst
wallabag-16dabc326311f084d671be188c7941bbb3c341c9.zip
Merge pull request #1436 from wallabag/v2-register
Public registration & oAuth2 \o/
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/InstallCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 1bd76ae3..6ebbd93c 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption;
8use Symfony\Component\Console\Input\ArrayInput; 8use Symfony\Component\Console\Input\ArrayInput;
9use Symfony\Component\Console\Output\OutputInterface; 9use Symfony\Component\Console\Output\OutputInterface;
10use Symfony\Component\Console\Output\NullOutput; 10use Symfony\Component\Console\Output\NullOutput;
11use Wallabag\CoreBundle\Entity\User; 11use Wallabag\UserBundle\Entity\User;
12use Wallabag\CoreBundle\Entity\Config; 12use Wallabag\CoreBundle\Entity\Config;
13 13
14class InstallCommand extends ContainerAwareCommand 14class InstallCommand extends ContainerAwareCommand
@@ -188,9 +188,10 @@ class InstallCommand extends ContainerAwareCommand
188 188
189 $em = $this->getContainer()->get('doctrine.orm.entity_manager'); 189 $em = $this->getContainer()->get('doctrine.orm.entity_manager');
190 190
191 $user = new User(); 191 $userManager = $this->getContainer()->get('fos_user.user_manager');
192 $user = $userManager->createUser();
192 $user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag')); 193 $user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag'));
193 $user->setPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag')); 194 $user->setPlainPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag'));
194 $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', '')); 195 $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', ''));
195 $user->setEnabled(true); 196 $user->setEnabled(true);
196 197