]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/User.java
fix: user.inVerificationLimit should be non-static
[gigi.git] / src / org / cacert / gigi / dbObjects / User.java
index c0b0128bdd37e28040605d141a80dd3fcad24b49..d3d5da02e3a1dc7c65a01b0c9531f9e98b0fb223 100644 (file)
@@ -542,9 +542,9 @@ public class User extends CertificateOwner {
         return new Assurance(res.getInt("id"), User.getById(res.getInt("from")), User.getById(res.getInt("to")), res.getString("location"), res.getString("method"), res.getInt("points"), res.getString("date"));
     }
 
-    public static boolean isInVerificationLimit(int id) {
+    public boolean isInVerificationLimit() {
         try (GigiPreparedStatement ps = new GigiPreparedStatement("SELECT 1 FROM `notary` WHERE `to` = ? AND `when` > (now() - (interval '1 month' * ?)) AND (`expire` IS NULL OR `expire` > now()) AND `deleted` IS NULL;")) {
-            ps.setInt(1, id);
+            ps.setInt(1, getId());
             ps.setInt(2, VERIFICATION_MONTHS);
 
             GigiResultSet rs = ps.executeQuery();