returnval = new UserAdminData(data.getUsername(), data.getSubjectDN(), data.getCAId(), data.getSubjectAltName(), data.getSubjectEmail(), data.getStatus()
returnval = new UserAdminData(data.getUsername(), data.getSubjectDN(), data.getCaId(), data.getSubjectAltName(), data.getSubjectEmail(), data.getStatus()
    public UserAdminData findUserBySubjectDN(Admin admin, String subjectdn, String issuerdn) throws AuthorizationDeniedException {        debug(">findUserBySubjectDN(" + subjectdn + ")");        String bcdn = CertTools.stringToBCDNString(subjectdn);        // String used in SQL so strip it        String dn = StringTools.strip(bcdn);        debug("Looking for users with subjectdn: " + dn + ", issuerdn : " + issuerdn);        UserAdminData returnval = null;        UserDataLocal data = null;        if (!authorizedToCA(admin, issuerdn.hashCode())) {            throw new AuthorizationDeniedException("Administrator not authorized to view user with given CA.");        }        try {            data = home.findBySubjectDN(dn, issuerdn.hashCode());        } catch (FinderException e) {            log.debug("Cannot find user with DN='" + dn + "'");        }        if (getGlobalConfiguration(admin).getEnableEndEntityProfileLimitations()) {            // Check if administrator is authorized to view user.            if (!authorizedToEndEntityProfile(admin, data.getEndEntityProfileId(), AvailableAccessRules.VIEW_RIGHTS))                throw new AuthorizationDeniedException("Administrator not authorized to view user.");        }        if (data != null) {            returnval = new UserAdminData(data.getUsername(), data.getSubjectDN(), data.getCAId(), data.getSubjectAltName(), data.getSubjectEmail(), data.getStatus()                    , data.getType(), data.getEndEntityProfileId(), data.getCertificateProfileId()                    , new java.util.Date(data.getTimeCreated()), new java.util.Date(data.getTimeModified())                    , data.getTokenType(), data.getHardTokenIssuerId());            returnval.setPassword(data.getClearPassword());        }        debug("<findUserBySubjectDN(" + subjectdn + ")");        return returnval;    } // findUserBySubjectDN