There is still a problem if your vB is closed for guest and a user registers at the forum without click on the activation eMail, he can still read threads in the forum!
I found the solution for one usergroupID in the thread.
PHP Code:
if ($bbuserinfo['userid'] == 0 or $bbuserinfo['usergroupid'] == 1)
But for more usergroupID's it should look like:
PHP Code:
//if ($bbuserinfo['userid'] == 0 or $bbuserinfo['usergroupid'] == 1 or $bbuserinfo['usergroupid'] == 3 or $bbuserinfo['usergroupid'] == 4 or $bbuserinfo['usergroupid'] == 8 or $bbuserinfo['usergroupid'] == 11 AND !preg_match("#(google|slurp@inktomi|yahoo! slurp|lycos|ask jeeves|scooter|fast-webcrawler|turntinbot|msnbot|webcrawler|Infoseek|W3C_Val|googlebot)#si", $_SERVER['HTTP_USER_AGENT']))
Is there a solution to reduce the line with the usergroupid checks like or $bbuserinfo['usergroupid'] == in array[1, 3, 4, 8, 11] or something like that ?