log.info("result erros " + result.getAllErrors().size());
log.info("result erros " + result.getErrorCount());
final String email = user.getEmail() == null ? "" : user.getEmail();
if (!email.isEmpty()) {
log.debug("email " + email);
final ReCaptchaResponse reCaptchaResponse = getReCaptcha().checkAnswer(
req.getRemoteAddr(), challenge, response);
final ValidateOperations validation = new ValidateOperations(
getSecurityService());
boolean _isValidEmailFormat = validation.validateEmail(email);
log.info("EMAIL FORMAT NOT VALID --> " + _isValidEmailFormat);
if (_isValidEmailFormat) {
final UserAccount userValidate = validation.checkifEmailExist(email);
if (userValidate == null) {
result.rejectValue("email", "secure.email.notvalid", new Object[] { user.getEmail() }, "");
}
log.info("reCaptchaResponse " + reCaptchaResponse.isValid());
//validate reCaptcha
validation.validateCaptcha(reCaptchaResponse, result);
if(reCaptchaResponse.getErrorMessage() != null) {
RequestSessionMap.getCurrent(req).put("resetError", Boolean.TRUE);
RequestSessionMap.getCurrent(req).put("resetErrorMessage", reCaptchaResponse.getErrorMessage());
log.fatal("reCaptcha Fatal Error: "+reCaptchaResponse.getErrorMessage());
}
log.info("result.hasErrors() " + result.hasErrors());
if (result.hasErrors()) {
return "forgot";
} else {