# Afficher le nom d'utilisateur lors de la connexion dans la bannière

**URL:** <https://meta.discourse.org/t/display-username-when-login-in-banner/83024>\
**Category:** Development\
**Created:** [Mars 14, 2018, 10:57 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:** 3

<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:** [Mars 15, 2018, 12:47 UTC](https://meta.discourse.org/t/display-username-when-login-in-banner/83024/3 "2018-03-15T00:47:21Z")

</div>

I think it’s as simple as adding this to the \</ head\> tab of the theme:

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

```

And then adding a `<span>` to the \< header\> tab where `*USERNAME*` is:

```plaintext
<h2 class="x-title">Hey<span id="logged-in-user"></span>! Bienvenue dans ta nouvelle communauté</h2>

```

---

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