Commit bd6cb473 authored by Matija Obreza's avatar Matija Obreza

Merge branch '377-account-email-validation' into 'master'

Account email validation

Closes #377

See merge request genesys-pgr/genesys-server!297
parents b164efef 3dfae110
......@@ -175,7 +175,7 @@ public class UserProfileController extends BaseController {
public String validateEmail2(ModelMap model, @PathVariable("tokenUuid") String tokenUuid, @RequestParam(value = "key", required = true) String key) {
try {
emailVerificationService.validateEMail(tokenUuid, key);
return "redirect:/profile";
return "redirect:/content/account-email-validated";
} catch (final NoSuchVerificationTokenException | TokenExpiredException e) {
// Not valid
model.addAttribute("tokenUuid", tokenUuid);
......
{
"en": {
"title": "Your email is verified",
"body": "Your email is verified, welcome to Genesys."
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@
<form role="form" class="form-vertical validate" action="<c:url value="/profile/${tokenUuid}/validate" />" method="post">
<div class="col-lg-3">
<input type="text" id="key" name="key" class="span1 form-control" maxlength="4"/>
<input value='<c:out value="${param.key}" />' type="text" id="key" name="key" class="span1 form-control" maxlength="4"/>
</div>
<div class="col-lg-3">
<input type="submit" value="OK" class="btn btn-primary"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment