The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
RE-DIRECTING TO REGISTER Based on Permissions
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 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"); } Would appreciate some help |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|