Hi;
I have created custom pages that I only want subscribed (paying) members to be able to view.
If an unregistered/registered member (who has not paid) tries to view, I have created a re-direct with the following code:
Code:
// Permissions Redirect
if ($usergroupid==8) {
header("Location: $url_register");
} else if ($usergroupid <= 1) {
header("Location: $url_register");
} else if ($usergroupid <= 2) {
header("Location: $url_payments");
} else if ($usergroupid <= 3) {
header("Location: $url_payments");
} else if ($usergroupid <= 4) {
header("Location: $url_payments");
}
User Group 1 = Unregistered;
User Group 2 = Registered;
User Group 3 = Awaiting Email;
User Group 4 = In Moderation;
However, the page is not redirecting properly.
What am I doing wrong in my coding?
Any help would be very much appreciated,
Jack
--------------- Added [DATE]1428650994[/DATE] at [TIME]1428650994[/TIME] ---------------
Someone PM'd me this coding, and it works, but unfortunately it directs
every user group to register:
Code:
if (!$vbulletin->userinfo['userid'] AND THIS_SCRIPT != 'register')
{
header("Location: " . $vbulletin->options['bburl'] . "/register.php");
}
How do I code it to be specific, to
one (or more) select user groups?
Would appreciate some help