# Get a user object by username or id javascript

**URL:** <https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342>\
**Category:** Development\
**Created:** [August 21, 2018, 7:03pm UTC](https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342 "2018-08-21T19:03:43Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [September 29, 2019, 5:19am UTC](https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342/7 "2019-09-29T05:19:54Z")

</div>

> [@Falco](#):
>
> Your plugin should be able to either update the username references when a username changes

I’ll check to see if it’s possible to do this in the current scenario.

> [@Falco](#):
>
> add the necessary routes and serializers you need to fetch the data.

Yeah. I’ll need to add a method to UsersController to find a user by id and add a method in the ember side User model to call this new controller method.

---

_[View the full topic](https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342)._
