PDA

View Full Version : Restrict Page by $usergroup or $userid


Hamish
09-14-2002, 09:18 AM
Hey there

i wanna make a secret page, that only a certain usergroup or userid can view. If not that usergroup, just redirects to a different page.

I want to know what to use, as i have very little PHP experience, apart from following instructions on hack installs, and "editing" as i see fit :)

can anyone help me ?

Thanks
Hamish

Xenon
09-14-2002, 10:12 AM
is this page build in in your forum or a complete stand alone script?

if it requires global.php in some of the first lines you can just make such an if clause:

if($bbuserinfo[usergroupid]!=x and $bbuserinfo[userid]!=y) exit;

Hamish
09-14-2002, 10:24 AM
yes, the link to this will be on the main index.php of the forum. So i will just ned that ode u gave me (i think).

Thanks a lot

Hamish
09-14-2002, 10:27 AM
i think i could just have this as a template addon, below copyright info

could i do that ?

Xenon
09-14-2002, 11:10 AM
no you can't do this as a template addon, it's a php code, you have to edit index.php