- Notary.assure(assurer, assuree, assureeName, dob, pointsI, location, req.getParameter("date"), type);
- if (aword != null && !aword.equals("")) {
- Language l = Language.getInstance(assuree.getPreferredLocale());
- String method = l.getTranslation("A password reset was triggered. If you did a password reset by assurance, please enter your secret password using this form:");
- String subject = l.getTranslation("Password reset by assurance");
- PasswordResetPage.initPasswordResetProcess(out, assuree, req, aword, l, method, subject);
+
+ LinkedList<Name> toAssure = new LinkedList<Name>();
+ for (int i = 0; i < selected.length; i++) {
+ if (selected[i]) {
+ toAssure.add(assureeNames[i]);
+ }
+ }
+ if (toAssure.size() == 0) {
+ throw new GigiApiException("You must confirm at least one name to verify an account.");
+ }
+
+ Notary.assureAll(assurer, assuree, dob, pointsI, location, req.getParameter("date"), type, toAssure.toArray(new Name[toAssure.size()]), cs.getCountry());
+
+ if (isWithPasswordReset()) {
+ Language langApplicant = Language.getInstance(assuree.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(assuree, req, aword, langApplicant, method, subject);