To restrict a page to logged in users only, just below the authenticate function, add this
<br />if(!$user['U_Username']) {<br /> $html = new html;<br /> $html -> not_right("You must be logged in to view this page.",$Cat);<br />}<br />
To restrict a page to a specific usergroup, first:
Find this:
<br /> $user = $userob -> authenticate();<br />
Change to this:
[/code]
$user = $userob -> authenticate("U_Groups");
[/code]
Below that, let's assume that you only want to allow access to usergroup #5, and if they aren't in the #5 group, we block them
Add this:
<br />if (!strstr($user['U_Groups'],"-5-")) {<br /> $html = new html;<br /> $html -> not_right("You are not authorized to view this page.",$Cat);<br />}<br />
To account for allowing multiple usergroups, example admins, moderators and group 5 are allowed:
<br />if ((!strstr($user['U_Groups'],"-5-")) && (!strstr($user['U_Groups'],"-1-")) && (!strstr($user['U_Groups'],"-2-"))) {<br /> $html = new html;<br /> $html -> not_right("You are not authorized to view this page.",$Cat);<br />}<br />
That should do it.
