Skip to content
Snippets Groups Projects
Verified Commit 9a11cb94 authored by Damien's avatar Damien
Browse files

FEAT #13339 TIME 0:20 Remove email control

parent 5c8dc693
No related branches found
No related tags found
No related merge requests found
...@@ -139,14 +139,7 @@ class ContactController ...@@ -139,14 +139,7 @@ class ContactController
if (!empty($control['errors'])) { if (!empty($control['errors'])) {
return $response->withStatus(400)->withJson(['errors' => $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 (!empty($body['communicationMeans'])) {
if (filter_var($body['communicationMeans'], FILTER_VALIDATE_EMAIL)) { if (filter_var($body['communicationMeans'], FILTER_VALIDATE_EMAIL)) {
$body['communicationMeans'] = ['email' => $body['communicationMeans']]; $body['communicationMeans'] = ['email' => $body['communicationMeans']];
......
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