Search the Community
Showing results for tags 'user'.
-
Hi everybody, long time lurker here. Wanted to say thanks for all the help you have all provided with problems in the past. I'm currently having an issue with getting the email address of a logged in user. Basically, what i'm wanting to do is get the email address of a logged in user, and if that email address matches a specific email address then display a hidden category. This is due to our biggest customer not wanting their products easily accessible by other customers, and i'm trying to keep them happy by only showing the category with their products to them. I have had some success by putting the following code in the box.navigation.php file: {if $USER.email == '[email protected]'} <li class="li-nav"><a href="www.page.co.uk/category.html" title="Customer Name">Customer Name</a></li> {/if} However, this only displays the extra link when I am on the "index.php?_a=profile" page, which is where I got the variable "$USER.email" from, so I assume this variable is only available to that page. What i'm looking for is some way of getting the current user email address reliably so my website knows when to display the category, or an alternate way of only displaying this category to a single customer. Thanks for reading, I look forward to your responses. Matt