Oh wow, thanks!
Edit: this is the conditional I used and it's working very well for me. Thanks guys!
PHP Code:
<if condition="$bbuserinfo[userid]">
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]"><img src="$navbar_ava[0]" alt="<phrase 1="$bbuserinfo[username]">$bbuserinfo[username]</phrase>" width="48" height="48" border="0" /></a>
<else />
<img src="$stylevar[imgdir_misc]/unknown.gif" alt="Avatar" width="48" height="48" border="0" />
</if>