# Exibir nome de usuário ao fazer login no banner

**URL:** <https://meta.discourse.org/t/display-username-when-login-in-banner/83024>\
**Category:** Development\
**Created:** [Março 14, 2018, 10:57pm UTC](https://meta.discourse.org/t/display-username-when-login-in-banner/83024 "2018-03-14T22:57:11Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)\
**Post date:** [Março 15, 2018, 6:40pm UTC](https://meta.discourse.org/t/display-username-when-login-in-banner/83024/8 "2018-03-15T18:40:45Z")

</div>

Sure, no problem. You can put the HTML code with the `<span>` in the After Header now, and the code below in the `</head>`. It displays the first name only. To show their full name, you would get rid of the `.split(' ')[0]`.

```plaintext
<script type="text/discourse-plugin" version="0.8.18">
    api.onPageChange(() => {
        if(api.getCurrentUser() != null) {
            $("#logged-in-user").text(" " + api.getCurrentUser().name.split(' ')[0]);
        }
    });
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/display-username-when-login-in-banner/83024)._
