- try {
- for (int i = 0; i < 25; i++) {
- User a = getAssurer(i);
- Notary.assure(byEmail, a, a.getNames()[0], a.getDoB(), 10, "Testmanager exp up code", validVerificationDateString(), AssuranceType.FACE_TO_FACE, getRandomCountry());
+ if (byEmail == null) {
+ resp.getWriter().println("User not found.");
+ return;
+ } else {
+ setVerificationDateToPast(byEmail.getPreferredName());
+ }
+
+ resp.getWriter().println("Verification set to time past the limit.");
+ } else if (req.getParameter("letverify") != null) {
+ String mail = req.getParameter("letverifyEmail");
+ User userByEmail = User.getByEmail(mail);
+ if (userByEmail == null || !userByEmail.canVerify()) {
+ resp.getWriter().println("User not found, or found user is not allowed to verify.");
+ } else {
+ try {
+ for (int i = 0; i < 25; i++) {
+ User a = getAgent(i);
+ Notary.verify(userByEmail, a, a.getNames()[0], a.getDoB(), 10, "Testmanager exp up code", validVerificationDateString(), VerificationType.FACE_TO_FACE, getRandomCountry());
+ }
+ resp.getWriter().println("Successfully added experience points.");
+ } catch (GigiApiException e) {
+ throw new Error(e);