I had to work on something similar.
What you need to do is grab a hold of the session information that vb populates once a user is logged in. You can use that to find out if a user is logged in, what group they belong to, etc. etc. All the details.
The simple way to get to this information is to run a vb on your test server, and edit the index.php file (of the forum index page) to include this line
It will tell you what variables are available to your scripts.