SyntaxFix
Write A Post
Hire A Developer
Questions
This one seems to be a better fit:
<#if userName?has_content> ... do something </#if>
http://freemarker.sourceforge.net/docs/ref_builtins_expert.html