]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/pages/wot/VerificationForm.java
add: implement password change log
[gigi.git] / src / club / wpia / gigi / pages / wot / VerificationForm.java
index 6a785c0ce8f714a3f610b9c817617dd0113e02b6..78ddcea1911c9d426698eb0bd49ee8c4501de25f 100644 (file)
@@ -12,6 +12,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 
 import club.wpia.gigi.GigiApiException;
+import club.wpia.gigi.dbObjects.Group;
 import club.wpia.gigi.dbObjects.Name;
 import club.wpia.gigi.dbObjects.User;
 import club.wpia.gigi.dbObjects.Verification.VerificationType;
@@ -152,6 +153,8 @@ public class VerificationForm extends Form {
                 return true;
             }
         });
+        res.put("ttpinfo", agent.isInGroup(Group.TTP_AGENT) && !agent.hasValidTTPAgentChallenge() && applicant.isInGroup(Group.TTP_APPLICANT));
+
         templ.output(out, l, res);
     }
 
@@ -217,13 +220,15 @@ public class VerificationForm extends Form {
         }
 
         Notary.verifyAll(agent, applicant, dob, pointsI, location, req.getParameter("date"), type, toVerify.toArray(new Name[toVerify.size()]), cs.getCountry());
-        Outputable result = new TranslateCommand("Verification complete.");
+
+        Outputable result = SprintfCommand.createSimple("Verification of user with email address {0} and {1} verification points complete.", applicant.getEmail(), points);
         if (isWithPasswordReset()) {
             Language langApplicant = Language.getInstance(applicant.getPreferredLocale());
             String method = langApplicant.getTranslation("A password reset was triggered. If you did a password reset by verification, please enter your secret password using this form:");
             String subject = langApplicant.getTranslation("Password reset by verification");
             PasswordResetPage.initPasswordResetProcess(applicant, req, aword, langApplicant, method, subject);
             result = new ConcatOutputable(result, new TranslateCommand("Password reset successful."));
+            agent.writeUserLog(applicant, "RA Agent triggered password reset");
         }
         return new SuccessMessageResult(result);
     }