# Accessing the store, e.g. users

**URL:** https://meta.discourse.org/t/accessing-the-store-e-g-users/48774
**Category:** Development
**Created:** [2016年八月18日 06:56 UTC](https://meta.discourse.org/t/accessing-the-store-e-g-users/48774 "2016-08-18T06:56:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [2016年八月18日 06:56 UTC](https://meta.discourse.org/t/accessing-the-store-e-g-users/48774/1 "2016-08-18T06:56:19Z")

</div>

I was wondering what the standard way is in order for plugins to access the discourse user store, for example you want to display the avatar or other general information about a certain user.

```javascript
var storeMain = api.container.lookup('store:main');
var users = storeMain.find('user');

```

However, this doesn’t work. Any other ideas?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2016年八月18日 16:34 UTC](https://meta.discourse.org/t/accessing-the-store-e-g-users/48774/2 "2016-08-18T16:34:41Z")

</div>

You should be able to fetch information about a user from the store like this:

```javascript
store.find('user', 'eviltrout').then(u => console.log(u.get('avatar_template')));

```

---

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [2016年八月18日 19:29 UTC](https://meta.discourse.org/t/accessing-the-store-e-g-users/48774/3 "2016-08-18T19:29:19Z")

</div>

Yes that did the trick, thanks!!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2016年八月18日 20:20 UTC](https://meta.discourse.org/t/accessing-the-store-e-g-users/48774/4 "2016-08-18T20:20:01Z")

</div>


