From 9a11cb94f0d044aab1007ff0c63d1cdee6217a17 Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Mon, 18 May 2020 16:57:04 +0200
Subject: [PATCH] FEAT #13339 TIME 0:20 Remove email control

---
 src/app/contact/controllers/ContactController.php | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/app/contact/controllers/ContactController.php b/src/app/contact/controllers/ContactController.php
index 24d0411eaef..ce7248672ae 100755
--- a/src/app/contact/controllers/ContactController.php
+++ b/src/app/contact/controllers/ContactController.php
@@ -139,14 +139,7 @@ class ContactController
         if (!empty($control['errors'])) {
             return $response->withStatus(400)->withJson(['errors' => $control['errors']]);
         }
-
-        if (!empty($body['email'])) {
-            $contact = ContactModel::get(['select' => ['id'], 'where' => ['email = ?'], 'data' => [$body['email']]]);
-            if (!empty($contact[0]['id'])) {
-                return $response->withJson(['id' => $contact[0]['id']]);
-            }
-        }
-
+        
         if (!empty($body['communicationMeans'])) {
             if (filter_var($body['communicationMeans'], FILTER_VALIDATE_EMAIL)) {
                 $body['communicationMeans'] = ['email' => $body['communicationMeans']];
-- 
GitLab