UserRegistry superTenantSystemRegistry = Util.getGovernanceSystemRegistry(
MultitenantConstants.SUPER_TENANT_ID);
String emailVerificationPath =
StratosConstants.ADMIN_EMAIL_VERIFICATION_FLAG_PATH +
RegistryConstants.PATH_SEPARATOR + tenantId;
if (!superTenantSystemRegistry.resourceExists(emailVerificationPath)) {
// the confirmation key should exist,otherwise fail registraion
String msg = "The confirmationKey doesn't exist in service.";
log.error(msg);
throw new RegistryException(msg);
}