![]() |
How to get the membership of a user anywhere
Trying to figure out what I need to have access to the membership of a user on any template.
If they're on register.php, doing {$userinfo.membership} will get me what I need, but it doesn't work on home.php for example. I've been trying to figure out what loads that info, but haven't gotten it to work yet. Can anyone point me to what I'm missing. Thanks |
This segment of code is from my wholesale tools mod.
Edit include/check_useraccount.php towards the bottom of the file where the other smarty->assign's are add the following: Code:
$smarty->assign("user_membership",$user_account["membership"]); Then use: Code:
{if $user_membership eq "Wholesale"} content {/if} |
Message
Hello there...
The code works fine but how can I post a message if the customer is not logged, something like: YOU MUST BE LOGGED TO VIEW THE PRODUCTS. Thanks, Alex |
I know this is an old post, but maybe still helpful to someone else.
Code:
{if $login eq "" } or if you want to display a message after they have logged: Code:
{if $login eq "" } |
All times are GMT -8. The time now is 08:17 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.