solved How to use user_email to toggle a badge

alt=
duke
@musamensa
7 years ago
253 posts
i am trying to toggle a badge to display when user_email is > 0 i am using
{if strlen ($user_email) > 0}
but dose not work

Thanks
updated by @musamensa: 01/10/18 01:37:05AM
douglas
@douglas
7 years ago
2,791 posts
What template are you putting the if statement in?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
duke
@musamensa
7 years ago
253 posts
jrUser i guess ...
alt=
duke
@musamensa
7 years ago
253 posts
sorry i did not the question i am working on the profile_header.tpl file, i want to display a badge under the profile image to indicate a profile has a user assigned to it and i would like to use 'email_user' to achieve this .
paul
@paul
7 years ago
4,326 posts
The only user variable that's available in the profile_header.tpl template is $_user_id and its value will be that of the user assigned to it. If the profile was created by admin, $_user_id will be the admin user ID, so assuming you want to 'badge' profiles assigned to regular users, and the admin user ID is 1, the code needed is -
{if $_user_id != 1}
    Badge code here
{/if}

hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
duke
@musamensa
7 years ago
253 posts
thanks, works just fine

Tags