# Unable to get a Discourse User Name for a dynamic path

**URL:** <https://meta.discourse.org/t/unable-to-get-a-discourse-user-name-for-a-dynamic-path/63082>\
**Category:** Product Support\
**Created:** [May 21, 2017, 1:46am UTC](https://meta.discourse.org/t/unable-to-get-a-discourse-user-name-for-a-dynamic-path/63082 "2017-05-21T01:46:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [May 21, 2017, 8:34am UTC](https://meta.discourse.org/t/unable-to-get-a-discourse-user-name-for-a-dynamic-path/63082/2 "2017-05-21T08:34:54Z")

</div>

If all you want to do is link to the current user’s preferences, you could simply use a link like

[https://meta.discourse.org/my/preferences](https://meta.discourse.org/my/preferences)

That would avoid JavaScript altogether 🙂

---

_[View the full topic](https://meta.discourse.org/t/unable-to-get-a-discourse-user-name-for-a-dynamic-path/63082)._
