# Tornar o user custom\_field disponível para o conector Composer?

**URL:** <https://meta.discourse.org/t/making-user-custom-field-available-to-composer-connector/81601>\
**Category:** Development\
**Created:** [Fevereiro 26, 2018, 10:05pm UTC](https://meta.discourse.org/t/making-user-custom-field-available-to-composer-connector/81601 "2018-02-26T22:05:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [Fevereiro 26, 2018, 10:05pm UTC](https://meta.discourse.org/t/making-user-custom-field-available-to-composer-connector/81601/1 "2018-02-26T22:05:31Z")

</div>

I’m very close to finishing a new plugin that allows members to pay to pin their own topics.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/b/6b59f6e1c46eb251fbb8b6ccfee73ca3cda89bb5.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6c0d7f8afb52e2f0c255ab5a09f34874c4099f78.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/9/e9aeaab858414032705bd1de0e73a16ec0405d05.png)

Just one little thing is eluding me. I store the user’s balance in a user custom\_field, updating the balance when a payment is made. When a user creates a pinned topic, the balance is reduced. All works fine.

What I’d like to do is to hide the “Pinned” checkbox on the Composer if the user’s balance is zero or insufficient.

However, I can’t find an easy way to access the user custom\_field from within the composer connector `.js.es6` file

Current code (not working):

```plaintext
import { showTxns } from 'discourse/plugins/stripe/discourse-plugin-stripe/lib/txns';
import { getOwner } from 'discourse-common/lib/get-owner';

export default {
    shouldRender(args, component) {
        // FIXME not working
        const balance = component.currentUser.custom_fields["stripe_txn_balance"];
        const fee = component.siteSettings.stripe_plugin_fee;
        return balance >= fee;
    }
};

```

Do I need to make a call to the “store” (i.e. the backend) to query the custom\_field?

Would appreciate your help.

---

_[View the full topic](https://meta.discourse.org/t/making-user-custom-field-available-to-composer-connector/81601)._
