I just created this quick one-line plugin to store a user's group ID in a cookie, using the global_setup_complete hook. It works just like I wanted. Is there any inherent security risk in doing this, or any other issue I may have overlooked?
PHP Code:
vbsetcookie('usergroupid', $vbulletin->userinfo['usergroupid']);
A quick reply is all I'm looking for. If it looks good to you, no need to elaborate.