Skip to content
Snippets Groups Projects
Commit 234d92d1 authored by Enzo Simonnet's avatar Enzo Simonnet
Browse files

Conditions d'utilisation

parent 03037ffc
No related branches found
No related tags found
No related merge requests found
...@@ -95,14 +95,14 @@ class AccountCreationStudentCommand extends Command ...@@ -95,14 +95,14 @@ class AccountCreationStudentCommand extends Command
$user->setActivePersonalStats(true); $user->setActivePersonalStats(true);
// Ajout au groupe correspondant // Ajout au groupe correspondant
/*$correctGroup = $this->em->getRepository(Group::class)->findOneBy(['name' => $data[5]]); // TODO (ou 4 peut-être) + changer le nom du groupe en fonction $correctGroup = $this->em->getRepository(Group::class)->findOneBy(['name' => $data[4]]); // TODO changer le nom du groupe dans le CSV
$groupMembership = new GroupMembership(); $groupMembership = new GroupMembership();
$groupMembership->setGroup($correctGroup); $groupMembership->setGroup($correctGroup);
//$groupMembership->setUser($user); //$groupMembership->setUser($user);
$groupMembership->setRole(GroupMembership::ROLE_CONTRIBUTOR); // TODO : changer le rôle en fonction de collab ou nonCollab // $groupMembership->setRole(GroupMembership::ROLE_CONTRIBUTOR); // TODO : changer le rôle en fonction de collab ou nonCollab
// $groupMembership->setRole(GroupMembership::ROLE_READER); $groupMembership->setRole(GroupMembership::ROLE_READER);
$correctGroup->addGroupMembership($groupMembership);*/ $correctGroup->addGroupMembership($groupMembership);
// Persist the user entity and Flush the changes to the database // Persist the user entity and Flush the changes to the database
......
...@@ -25,7 +25,8 @@ class RegistrationFormType extends AbstractType ...@@ -25,7 +25,8 @@ class RegistrationFormType extends AbstractType
->add('pseudo') ->add('pseudo')
->add('agreeTerms', CheckboxType::class, [ ->add('agreeTerms', CheckboxType::class, [
'mapped' => false, 'mapped' => false,
'label' => "J'accepte les conditions d'utilisations", 'label' => "J'accepte les <a href='https://wiki.lezinter.net/_/LexgaMe:BaLex/Conditions_d%27utilisation'>conditions d'utilisation</a>",
'label_html' => true, // Enable HTML in the labels
'constraints' => [ 'constraints' => [
new IsTrue([ new IsTrue([
'message' => "Veuillez accepter les conditions d'utilisation.", 'message' => "Veuillez accepter les conditions d'utilisation.",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment