# Ícones personalizados de admin/usuário no cabeçalho

**URL:** <https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337>\
**Category:** Product Support\
**Created:** [4 Fevereiro , 2019 19:08 UTC](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337 "2019-02-04T19:08:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![WorldIsMine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/worldismine/32/455660_2.png) [@WorldIsMine](https://meta.discourse.org/u/WorldIsMine)\
**Post date:** [4 Fevereiro , 2019 19:08 UTC](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337/1 "2019-02-04T19:08:07Z")

</div>

I’ve used a script created by one of the team members here that placed an extra icon in the header. Depending on user type, it showed a different icon.

However, since 2.2, this no longer works.

```
<script type="text/discourse-plugin" version="0.8.23">
let currentUser = api.getCurrentUser();
if (currentUser && currentUser.admin) {
api.decorateWidget('header-icons:before', helper => {
return helper.h('li', [
    helper.h('a#tickets-button', {
        href:'https://Example.com',
        title: 'Button 1',
        text: ''
    }, helper.h('')),
]);
});
}
</script>
<script type="text/discourse-plugin" version="0.4">
let currentUser = api.getCurrentUser();
if (currentUser && !currentUser.admin) {
api.decorateWidget('header-icons:before', helper => {
return helper.h('li', [
    helper.h('a#home-button', {
        href:'https://Example2.com',
        title: 'Button 2'
    }, helper.h('i.fa.fa-shopping-cart.home-button-icon')),
]);
});
}
</script>

```

Would appreciate any help.

---

_[View the full topic](https://meta.discourse.org/t/custom-admin-user-icons-in-header/108337)._
