setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED,false);
setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED);
    public void revokeUser(Admin admin, String username, int reason) throws AuthorizationDeniedException, FinderException {        debug(">revokeUser(" + username + ")");        UserDataPK pk = new UserDataPK(username);        UserDataLocal data;        try {            data = home.findByPrimaryKey(pk);        } catch (ObjectNotFoundException oe) {            throw new EJBException(oe);        }        int caid = data.getCaId();        if (!authorizedToCA(admin, caid)) {            logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_ERROR_REVOKEDENDENTITY, "Administrator not authorized to revoke user with given CA.");            throw new AuthorizationDeniedException("Administrator not authorized to revoke user with given CA.");        }        if (getGlobalConfiguration(admin).getEnableEndEntityProfileLimitations()) {            if (!authorizedToEndEntityProfile(admin, data.getEndEntityProfileId(), AvailableAccessRules.REVOKE_RIGHTS)) {                logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_ERROR_REVOKEDENDENTITY, "Administrator not authorized");                throw new AuthorizationDeniedException("Not authorized to revoke user : " + username + ".");            }        }        CertificateProfile prof = this.certificatesession.getCertificateProfile(admin, data.getCertificateProfileId());        Collection publishers;        if (prof == null) {            publishers = new ArrayList();        } else {            publishers = prof.getPublisherList();        }        try {			setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED,false);		} catch (ApprovalException e) {			throw new EJBException("This should never happen",e);		} catch (WaitingForApprovalException e) {			throw new EJBException("This should never happen",e);		}        certificatesession.setRevokeStatus(admin, username, publishers, reason);        logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_INFO_REVOKEDENDENTITY, "");        debug("<revokeUser()");    } // revokeUser