From 0a878469d4038c36c84d1dd707265d880fa342e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Oct 2015 06:29:55 +0200 Subject: move some files to UserBundle --- .../UserBundle/DataFixtures/ORM/LoadUserData.php | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php (limited to 'src/Wallabag/UserBundle/DataFixtures/ORM') diff --git a/src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php b/src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php new file mode 100644 index 00000000..d48855da --- /dev/null +++ b/src/Wallabag/UserBundle/DataFixtures/ORM/LoadUserData.php @@ -0,0 +1,50 @@ +setName('Big boss'); + $userAdmin->setEmail('bigboss@wallabag.org'); + $userAdmin->setUsername('admin'); + $userAdmin->setPlainPassword('mypassword'); + $userAdmin->setEnabled(true); + $userAdmin->addRole('ROLE_SUPER_ADMIN'); + + $manager->persist($userAdmin); + + $this->addReference('admin-user', $userAdmin); + + $bobUser = new User(); + $bobUser->setName('Bobby'); + $bobUser->setEmail('bobby@wallabag.org'); + $bobUser->setUsername('bob'); + $bobUser->setPlainPassword('mypassword'); + $bobUser->setEnabled(true); + + $manager->persist($bobUser); + + $this->addReference('bob-user', $bobUser); + + $manager->flush(); + } + + /** + * {@inheritdoc} + */ + public function getOrder() + { + return 10; + } +} -- cgit v1.2.3