diff options
| author | polo <ordipolo@gmx.fr> | 2025-12-16 22:41:57 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-12-16 22:41:57 +0100 |
| commit | 423755b019a09111b971e36c53e2557e2f5a704f (patch) | |
| tree | 022c0a911133d676dd8e4e90379f8b186863fc88 /src/controller/ContactFormController.php | |
| parent | 22da81bbcb9bb61fa484c9af6fbb667b685d2f9b (diff) | |
| download | cms-423755b019a09111b971e36c53e2557e2f5a704f.tar.gz cms-423755b019a09111b971e36c53e2557e2f5a704f.tar.bz2 cms-423755b019a09111b971e36c53e2557e2f5a704f.zip | |
page emails, application du RGPD: table email et nettoyeur, renommage de $id_email
Diffstat (limited to 'src/controller/ContactFormController.php')
| -rw-r--r-- | src/controller/ContactFormController.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/controller/ContactFormController.php b/src/controller/ContactFormController.php index 181e93c..01faa72 100644 --- a/src/controller/ContactFormController.php +++ b/src/controller/ContactFormController.php | |||
| @@ -80,4 +80,20 @@ class ContactFormController | |||
| 80 | } | 80 | } |
| 81 | die; | 81 | die; |
| 82 | } | 82 | } |
| 83 | static public function deleteEmail(EntityManager $entityManager, array $json): void | ||
| 84 | { | ||
| 85 | $email = $entityManager->find('App\Entity\Email', $json['id']); | ||
| 86 | $entityManager->remove($email); | ||
| 87 | $entityManager->flush(); | ||
| 88 | echo json_encode(['success' => true]); | ||
| 89 | die; | ||
| 90 | } | ||
| 91 | static public function toggleSensitiveEmail(EntityManager $entityManager, array $json): void | ||
| 92 | { | ||
| 93 | $email = $entityManager->find('App\Entity\Email', $json['id']); | ||
| 94 | $email->makeSensitive($json['checked']); | ||
| 95 | $entityManager->flush(); | ||
| 96 | echo json_encode(['success' => true, 'checked' => $json['checked'], 'deletion_date' => $email->getDeletionDate()->format('d/m/Y')]); | ||
| 97 | die; | ||
| 98 | } | ||
| 83 | } \ No newline at end of file | 99 | } \ No newline at end of file |
