Quote:
Originally Posted by bluecat
Well I spoke too soon. Although it workds perfect if you manually change users to a primary usergroup, it blocks out "Secondary Usergroups" that are paid subscribers who have legitimate access.
What I'm wondering is if I can simply use the same codes, but instead of print_no_permission, add say three more that say if in a certain usergroup (paid subscribers that listed as registered id:2, and a secondary usergroup, id:35), then grant permission.
For example,
PHP Code:
if ($bbuserinfo['usergroupid'] == 9 and $forumid == 95)
{
grant_permission();
}
The "grant_permission" is totally wrong, I just don't know the term. But I'm just wondering how I can have it check userid and "allow" access. Any help is great. Thanks (also, even though the first 3 are disallowing the registered users, the secondary usergroups would have a different id number and should be able to enter). I hope this makes sense.
|
Try this:
PHP Code:
$membergroups = explode(',',$bbuserinfo[membergroupids]);
if ($bbuserinfo['usergroupid'] == 2 and ($forumid == 73 or $forumid == 45 or $forumid == 95) and !array_search(X,$membergroups))
{
print_no_permission();
}
and replace X with the paid subscriber usergroupid. This code will check if the user has a membergroup of the paid subscribers group.