Merge changes I7ab53fa7,Id4354942
authorMarcus Mängel <m.maengel@inopiae.de>
Mon, 6 Apr 2020 03:13:23 +0000 (03:13 +0000)
committerGerrit Code Review <gigi-system@dogcraft.de>
Mon, 6 Apr 2020 03:13:23 +0000 (03:13 +0000)
* changes:
  upd: add exception handling
  upd: rephrase variables names and update expireCATS

1  2 
util-testing/club/wpia/gigi/pages/Manager.java

@@@ -450,21 -451,10 +454,21 @@@ public class Manager extends Page 
  
              resp.getWriter().println("User has been verified " + verifications + " times." + info);
  
 +        } else if (req.getParameter("verifyexpire") != null) {
 +            String mail = req.getParameter("verifyEmail");
 +            User byEmail = User.getByEmail(mail);
 +            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 byEmail = User.getByEmail(mail);
-             if (byEmail == null || !byEmail.canVerify()) {
+             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 {