correction init group tout le monde

This commit is contained in:
afornerot 2019-04-05 14:37:38 +02:00
parent 77ca334c16
commit d115ae0d4d
1 changed files with 6 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class InitDataCommand extends ContainerAwareCommand
$output->writeln('CORE = Default Data'); $output->writeln('CORE = Default Data');
$em = $this->getContainer()->get('doctrine')->getEntityManager(); $em = $this->getContainer()->get('doctrine')->getEntityManager();
$finder = new Finder(); $finder = new Finder();
$finder->in('src/Cadoles/CoreBundle/Command/data'); $finder->in('src/Cadoles/CoreBundle/Command/data');
@ -67,7 +67,7 @@ class InitDataCommand extends ContainerAwareCommand
$stmt = $em->getConnection()->prepare($content); $stmt = $em->getConnection()->prepare($content);
$stmt->execute(); $stmt->execute();
} }
// Init city // Init city
@ -78,7 +78,7 @@ class InitDataCommand extends ContainerAwareCommand
$stmt = $em->getConnection()->prepare($content); $stmt = $em->getConnection()->prepare($content);
$stmt->execute(); $stmt->execute();
} }
$stmt->closeCursor(); $stmt->closeCursor();
@ -91,8 +91,9 @@ class InitDataCommand extends ContainerAwareCommand
$group->setFgopen(false); $group->setFgopen(false);
$group->setFgall(true); $group->setFgall(true);
$group->setFgtemplate(false); $group->setFgtemplate(false);
$group->setFgcanshare(false);
$em->persist($group); $em->persist($group);
$em->flush(); $em->flush();
} }
$sub = $em->createQueryBuilder(); $sub = $em->createQueryBuilder();
@ -113,7 +114,7 @@ class InitDataCommand extends ContainerAwareCommand
$usergroup->setUser($data); $usergroup->setUser($data);
$usergroup->setGroup($group); $usergroup->setGroup($group);
$em->persist($usergroup); $em->persist($usergroup);
$em->flush(); $em->flush();
} }
$output->writeln(''); $output->writeln('');