diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-09-12 16:13:40 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-09-12 16:13:40 +0200 |
commit | fb96ea884532e9804194afd92a98c5c6aecc177e (patch) | |
tree | dfcb9a7cd9a1eeac200852ef74f6fc9329e3337c /src/Wallabag/CoreBundle/Command | |
parent | 9c08a891f9bb90bc3f23a575a734283c1ee00ba1 (diff) | |
parent | af43bd37675954f937720f7b6fbcf78d85928bc5 (diff) | |
download | wallabag-fb96ea884532e9804194afd92a98c5c6aecc177e.tar.gz wallabag-fb96ea884532e9804194afd92a98c5c6aecc177e.tar.zst wallabag-fb96ea884532e9804194afd92a98c5c6aecc177e.zip |
Merge pull request #1362 from wallabag/v2-fosuser
implement FosUser
Diffstat (limited to 'src/Wallabag/CoreBundle/Command')
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 491c67f9..1bd76ae3 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -192,6 +192,7 @@ class InstallCommand extends ContainerAwareCommand | |||
192 | $user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag')); | 192 | $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')); | 193 | $user->setPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag')); |
194 | $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', '')); | 194 | $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', '')); |
195 | $user->setEnabled(true); | ||
195 | 196 | ||
196 | $em->persist($user); | 197 | $em->persist($user); |
197 | 198 | ||
@@ -272,10 +273,11 @@ class InstallCommand extends ContainerAwareCommand | |||
272 | */ | 273 | */ |
273 | private function isDatabasePresent() | 274 | private function isDatabasePresent() |
274 | { | 275 | { |
275 | $databaseName = $this->getContainer()->getParameter('database_name'); | 276 | $connection = $this->getContainer()->get('doctrine')->getManager()->getConnection(); |
277 | $databaseName = $connection->getDatabase(); | ||
276 | 278 | ||
277 | try { | 279 | try { |
278 | $schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager(); | 280 | $schemaManager = $connection->getSchemaManager(); |
279 | } catch (\Exception $exception) { | 281 | } catch (\Exception $exception) { |
280 | if (false !== strpos($exception->getMessage(), sprintf("Unknown database '%s'", $databaseName))) { | 282 | if (false !== strpos($exception->getMessage(), sprintf("Unknown database '%s'", $databaseName))) { |
281 | return false; | 283 | return false; |