<if condition="$vbulletin->userinfo[userid]"> ....code for logged in users </else> ...code for guests </if>