# E-mail adres of current user

**URL:** https://community.silverfin.com/t/e-mail-adres-of-current-user/1568
**Category:** Templates
**Created:** [October 4, 2019, 2:43pm UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568 "2019-10-04T14:43:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ronald\_groot\_RSF](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/ronald_groot_rsf/32/1019_2.png) [@ronald\_groot\_RSF](https://community.silverfin.com/u/ronald_groot_RSF)
#### Post date: [October 4, 2019, 2:43pm UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/1 "2019-10-04T14:43:23Z")

</div>

When I assign a ToDo to an external user I would like to hide parts of the template that are for intrenal use only. Can I get the user information of the current user in a drop somehow so I can make an if statement like:

```auto
{% if user.email contains "@mycompany.com" %}
Show content
{% endif %}

```

Is there any way to do this?

---

<div class="post-metadata">

### Author: ![Kimberly\_Vlietinck](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/kimberly_vlietinck/32/1496_2.png) [@Kimberly\_Vlietinck](https://community.silverfin.com/u/Kimberly_Vlietinck)
#### Post date: [October 4, 2019, 2:49pm UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/2 "2019-10-04T14:49:37Z")

</div>

Hi @ronald_groot_RSF,

This is exactly the way to do it. Is this code not working for you?

Regards,  
Kimberly

---

<div class="post-metadata">

### Author: ![ronald\_groot\_RSF](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/ronald_groot_rsf/32/1019_2.png) [@ronald\_groot\_RSF](https://community.silverfin.com/u/ronald_groot_RSF)
#### Post date: [October 7, 2019, 9:14am UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/3 "2019-10-07T09:14:50Z")

</div>

Okay, silly me… I couldn’t get it working and did not find any documentation, so I created the topic.

It works perfectly if I do not use the ‘@’ symbol. Using the ‘@’ somehow prevents me from getting the result I want. So this works:

```auto
{% if user.email contains "mycompany.com" %}
Show content
{% endif %}

```

Thanks @Kimberly_Vlietinck

---

<div class="post-metadata">

### Author: ![ronald\_groot\_RSF](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/ronald_groot_rsf/32/1019_2.png) [@ronald\_groot\_RSF](https://community.silverfin.com/u/ronald_groot_RSF)
#### Post date: [January 29, 2020, 8:22am UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/4 "2020-01-29T08:22:32Z")

</div>

Has there been a change that causes the user.email drop to stop working? All checks on this check have stopped working all of a sudden and fetching the field provides me with no data. Please help?!

---

<div class="post-metadata">

### Author: ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)
#### Post date: [January 29, 2020, 9:11am UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/5 "2020-01-29T09:11:34Z")

</div>

Hi @ronald_groot_RSF,

The user.email drop still works, you can easily check this by printing {{ user.email }} in a document. Can you be more specific what check is not working, what did you expect to happen and what SF is showing instead?

Best regards,

Michiel

---

<div class="post-metadata">

### Author: ![ronald\_groot\_RSF](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/ronald_groot_rsf/32/1019_2.png) [@ronald\_groot\_RSF](https://community.silverfin.com/u/ronald_groot_RSF)
#### Post date: [January 29, 2020, 9:18am UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/6 "2020-01-29T09:18:57Z")

</div>

Hi @Michiel,

That’s what I checked. I’ve added this to my template:

```auto
Test is data is shown
{{ user.email }}
Test if data is shown

```

And this is what I see:

Test is data is shown

Test if data is shown

---

<div class="post-metadata">

### Author: ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)
#### Post date: [January 29, 2020, 12:49pm UTC](https://community.silverfin.com/t/e-mail-adres-of-current-user/1568/7 "2020-01-29T12:49:38Z")

</div>

Hi @ronald_groot_RSF,

This was a small bug in our code, which has been solved in the meantime.

Best regards,

Michiel
