private List<VerifiableEmail> getEmailIdentities(RegistrationRequestState currentRequest) throws EngineException { List<VerifiableEmail> emailIds = new ArrayList<>(); List<IdentityParam> identities = currentRequest.getRequest().getIdentities(); if (identities == null) return emailIds; for (IdentityParam id : identities) if (id != null && id.getTypeId().equals(EmailIdentity.ID)) emailIds.add(EmailIdentity.fromIdentityParam(id)); return emailIds; }
private List<VerifiableEmail> getEmailIdentities(EntityParam recipient, SqlSession sql) throws EngineException { List<VerifiableEmail> emailIds = new ArrayList<>(); long entityId = idResolver.getEntityId(recipient, sql); Identity[] identities = dbIdentities.getIdentitiesForEntityNoContext(entityId, sql); for (Identity id : identities) if (id.getTypeId().equals(EmailIdentity.ID)) emailIds.add(EmailIdentity.fromIdentityParam(id)); return emailIds; }