if (eperson != null)
if (eperson != null && eperson.getActive())
    protected void doDSGet(Context context,        HttpServletRequest request,        HttpServletResponse response)        throws ServletException, IOException, SQLException, AuthorizeException    {        // Obtain the certificate from the request, if any        X509Certificate[] certs = (X509Certificate[]) request.getAttribute(            "javax.servlet.request.X509Certificate");        if (certs.length == 0)        {            // No certificate - show login form                        // Was this reached by clicking on the "I have a cert" link on the            // password form?            if (request.getParameter("from_form") != null)            {                // If from "I have cert" link, display the login form again                // with a suitable message		log.info(LogManager.getHeader(context,                    "failed_login",                    "type=x509certificate"));                JSPManager.showJSP(request, response,                    "/login/no-valid-cert.jsp");            }            else            {                // We came here straight from an authentication invocation                // Just display the login form which gives cert + password                // options.                JSPManager.showJSP(request, response,                    "/login/password.jsp");            }        }        else        {            // We have a cert            try            {                if (X509Manager.isValid(certs[0]))                {                    // And it's valid - try and get an e-person                    EPerson eperson = X509Manager.getUser(context, certs[0]);                    // Do we have an e-person?                    if (eperson != null)                    {                        // Everything OK - log them in.                        Authenticate.loggedIn(context, request, eperson);		        log.info(LogManager.getHeader(context,                            "login",                            "type=x509certificate"));                        // resume previous request                        Authenticate.resumeInterruptedRequest(request,                            response);                        return;                    }                    else                    {                        // Valid certificate, but no e-person record		        log.info(LogManager.getHeader(context,                            "failed_login",                            "type=cert_but_no_record"));                        JSPManager.showJSP(request, response,                            "/login/not-in-records.jsp");                    }                }                else                {                    // Not a valid cert		    log.info(LogManager.getHeader(context,                        "failed_login",                        "type=x509certificate"));                    JSPManager.showJSP(request, response,                        "/login/no-valid-cert.jsp");                }            }            catch (CertificateException ce)            {                log.warn(LogManager.getHeader(context,                    "certificate_exception",                    ""),                    ce);                JSPManager.showInternalError(request, response);            }        }    }