From 1f9193eee3e3d82c93869d3341e7cb5735a0cb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Correa?= Date: Thu, 17 Jun 2021 18:01:52 -0300 Subject: [PATCH] modifica mensajes del registro y el envio de correo --- src/routes.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/routes.php b/src/routes.php index 116eef6..b7a6876 100644 --- a/src/routes.php +++ b/src/routes.php @@ -200,7 +200,7 @@ $app->group('/api', function($app){ //ReCaptcha Validation if(!isset($data['g-recaptcha-response'])||empty($data['g-recaptcha-response'])){ - $messages->addMessageNow("submit-register-err", "Please validate captcha!"); + $messages->addMessageNow("submit-register-err", "Debe validar el ReCaptcha!"); } else { $recapsecret = $this->settings['recaptcha']['secret']; @@ -212,7 +212,7 @@ $app->group('/api', function($app){ //get remote ip from request header TODO $resp = $recaptcha->verify($data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']); if(!$resp->isSuccess()){ - $messages->addMessageNow("submit-register-err", "ReCaptcha validation error " . implode($resp->getErrorCodes())); + $messages->addMessageNow("submit-register-err", "Error de validación de ReCaptcha " . implode($resp->getErrorCodes())); } else { unset($data['g-recaptcha-response']); @@ -243,18 +243,18 @@ $app->group('/api', function($app){ $messages->addMessageNow("submit-register-err", "DB error: ".$e->getMessage()); } $arrayresponse = array("success" => true, - "msg"=>"You have been successfully registered to Workshop on Surface Dynamics 2018", + "msg"=>"Su registro al CLAM2021 ha sido satisfactorio.", "data"=>$data); - /*$mailbody = "Hello ".$data["nombre"]." ".$data["apellido"].",\n\n". - "You have been successfully registered to the Workshop on Surface Dynamics 2018!\n\n". - "If you need to change the information you have provided and for any ". - "questions please contact surfacedynamics2018@cmat.edu.uy\n\n". - "Best!\n\n"; - $headers = 'From: ' . "surfacedynamics2018@cmat.edu.uy" . "\r\n" . - 'Reply-To: ' . "surfacedynamics2018@edu.uy" . "\r\n" . + $mailbody = "Hola ".$data["nombre"]." ".$data["apellido"].",\n\n". + "Se ha inscripto satisfactoriamente al CLAM2021!\n\n". + "Por cualquier consulta no dude en contactar al comité organizador en: ". + "clam2021@fing.edu.uy\n\n". + "Saludos Cordiales!\n\n"; + $headers = 'From: ' . "clam2021@fing.edu.uy" . "\r\n" . + 'Reply-To: ' . "clam2021@fing.edu.uy" . "\r\n" . 'Content-Type: ' . "text/plain; charset=UTF-8". "\r\n" . 'X-Mailer: PHP/' . phpversion(); - mail($data['email'], 'Successfully registered to the Surface Dynamics 2018 Workshop', $mailbody, $headers);*/ + mail($data['email'], 'Registro exitoso CLAM2021', $mailbody, $headers);*/ } $newres = $response->withJson($arrayresponse); return $newres;