This UNION would become something like:

```
SELECT
  obj_id,
  array_agg(username) AS crmacct_usernames
FROM (
  -- CRM Account's users.
  SELECT
    obj_id,
    username
  FROM shiptoinfo
  JOIN crmacct ON shipto_cust_id = crmacct_cust_id
  LEFT JOIN xt.crmacct_users USING (crmacct_id)
  WHERE 1=1
    AND username IS NOT NULL

  -- Shared access grants.
  UNION
  SELECT
    xt.obj_share.obj_share_obj_id AS obj_id,
    xt.obj_share.obj_share_user AS username
  FROM shiptoinfo
  JOIN xt.obj_share ON shiptoinfo.obj_id = xt.obj_share.obj_share_obj_id
) shipto_users
```

We would need to add obj_id to the CustomerShipto ORM or my Drupal Shipto ORM so I could make a toMany relation on the obj_id.

The UNION is still needed here to get both the default CRM Account users and the share users.