package com.inepex.ineFrame.server.auth;

import com.google.inject.servlet.SessionScoped;

@SessionScoped
public class RegistrationCaptchaInfo {

    public static final int MAX_REGISTRATION_WITHOUT_CAPTCHA = 3;

    private int registrationCount = 0;

    /**
     * USE ONLY in synchronized blocks!!!!!
     */
    public void registerRegistration() {
        registrationCount++;
    }

    /**
     * USE ONLY in synchronized blocks!!!!!
     */
    public boolean needCaptcha() {
        return registrationCount >= MAX_REGISTRATION_WITHOUT_CAPTCHA;
    }
}

@@ -206,9 +206,10 @@
 A = 
-3
+10
 ;%0A%0A 

remove captcha from registration