diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 352fa12..c26f254 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -253,7 +253,11 @@ class ContactController extends Controller $contact->contact_ville = $commune; $contact->contact_country = $pays; $contact->contact_siteId = $refsite; - $contact->contact_hash = strtoupper(md5(uniqid(time(), true))); + if (isset($request->hashcode) && $request->hashcode != "") { + $contact->contact_hash = $request->hashcode; + } else { + $contact->contact_hash = strtoupper(md5(uniqid(time(), true))); + } } else { // $log->log_params = json_encode(['refadherent' => $request->refadherent, 'refsite'=>$request->refsite, 'nom' => $request->nom, 'prenom' => $request->prenom, 'email' => $request->email, 'code postal' => $request->code_postal, 'commune' => $request->commune]); // $log->log_refsite = $request->refsite;