PDA

View Full Version : Can I do this?


SharronH
05-03-2003, 10:39 PM
How can I configure the php scripts so that a specific usergroupid will get redirected to another .php page on the server? Thanks!

filburt1
05-03-2003, 10:44 PM
Put this in phpinclude:

if (in_array($bbuserinfo['usergroupid'], array(comma-delimited list of usergroupids)))
{
header("Location: newpage.php");
exit;
}

SharronH
05-03-2003, 10:52 PM
Thanks very much for your help, but I don't know where the put the userid at.... the is id 12



And here's my current phpinclude:


// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();


if (in_array($bbuserinfo['usergroupid'], array(comma-delimited list of usergroupids)))
{
header("Location: ban.php");
exit;
}


include("./vbs_counter.php");



Thanks again!

filburt1
05-03-2003, 11:16 PM
Change the comma-delimited list of usergroupids to just that; also get rid of the and that didn't get parsed.

If it's only one usergroupid (12) then use:

if ($bbuserinfo['usergroupid'] == 12)
{
header("Location: ban.php");
exit;
}

BTW you can just change the usergroup in question's permissions to nothing to ban them.