SSO #1

Merged
Charles-Edouard merged 23 commits from SSO into main 2025-07-29 16:46:46 +02:00
1 changed files with 9 additions and 0 deletions
Showing only changes of commit 93f786bc7e - Show all commits

View File

@ -50,4 +50,13 @@ class CguUserService
$cguUser->setIsAccepted(true); $cguUser->setIsAccepted(true);
$this->entityManager->flush(); $this->entityManager->flush();
} }
//Function can only be called if the user has already accepted the CGU
public function declineCgu(UserInterface $user, Cgu $cgu): void
{
$cguUser = $this->entityManager->getRepository(CguUser::class)->findOneBy(['users' => $user, 'cgu' => $cgu]);
$cguUser->setIsAccepted(false);
$this->entityManager->flush();
}
} }