Code:
<if condition="$thread['postuserid'] == $bbuserinfo['userid']">
The reason your first one will show to everyone is because $vbulletin->userinfo doesn't exist yet (I don't think), so it will match null, empty, 0, or false, unless you have used the identical operator. The second variable, $threadinfo, also does not exist.
In the second example, $bbuserinfo does exist, and will not match null, empty, 0, or false.