if(!$bbuserinfo[userid]) { // guest code } else { // member code }
if($bbuserinfo[userid]) { //member info }