# How can I get account fields using account-link field of collection without calling /listUsers or creating a new endpoint? Like an SQL INNER JOIN

**URL:** <https://discourse.getcockpit.com/t/how-can-i-get-account-fields-using-account-link-field-of-collection-without-calling-listusers-or-creating-a-new-endpoint-like-an-sql-inner-join/1735>\
**Category:** Support\
**Created:** [December 6, 2020, 9:33am UTC](https://discourse.getcockpit.com/t/how-can-i-get-account-fields-using-account-link-field-of-collection-without-calling-listusers-or-creating-a-new-endpoint-like-an-sql-inner-join/1735 "2020-12-06T09:33:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![entelostre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/entelostre/32/727_2.png) [@entelostre](https://discourse.getcockpit.com/u/entelostre)\
**Post date:** [December 8, 2020, 6:52pm UTC](https://discourse.getcockpit.com/t/how-can-i-get-account-fields-using-account-link-field-of-collection-without-calling-listusers-or-creating-a-new-endpoint-like-an-sql-inner-join/1735/2 "2020-12-08T18:52:12Z")

</div>

I had to follow solution n.2 from [here](https://discourse.getcockpit.com/t/how-to-refer-to-another-collections-or-accounts/324/7)

You must create a folder `\cockpit-master\config` (if it doesn’t exist) and add a file `bootstrap.php` in which you will add implementation to handle the event of `collections.find.after.collectionName` and you will be able to do extra database calls and add content to the response before it is returned to the client. (see [example](https://discourse.getcockpit.com/t/how-to-refer-to-another-collections-or-accounts/324/7)).

---

_[View the full topic](https://discourse.getcockpit.com/t/how-can-i-get-account-fields-using-account-link-field-of-collection-without-calling-listusers-or-creating-a-new-endpoint-like-an-sql-inner-join/1735)._
