flash("error", Messages.get("error.technical"));
Form<AskForm> askForm = form(AskForm.class);
return badRequest(ask.render(askForm));
}
Token resetToken = Token.findByTokenAndType(token, Token.TypeToken.password);
if (resetToken == null) {
flash("error", Messages.get("error.technical"));
Form<AskForm> askForm = form(AskForm.class);
return badRequest(ask.render(askForm));
}
if (resetToken.isExpired()) {
resetToken.delete();
flash("error", Messages.get("error.expiredresetlink"));
Form<AskForm> askForm = form(AskForm.class);
return badRequest(ask.render(askForm));
}