1
Hey guys, Im aware I could make an easy module and set permission's to bypass my question here but forced to use custom pages instead because there are differant groups that can access differant pages so a module couldn't specify each group for each page.
What I am trying to do on these custom pages is secure the page using XOOPS groups code.
I have failed to create something I could use after extensive XOOPS searching so if anyone can lend a hand, my thanks to you.
including mainfile header
$g_id = $xoopsUser->getVar('uid');
$thisgroup =& $member_handler->getGroup($g_id);
$groupName = $thisgroup->getVar("name", "E");
if ($groupName == "Webmasters" ) {
} elseif ($groupName == "AdminType1" ) {
} elseif ($groupName == "AdminType2" ) {
} else {
echo "
";
redirect_header("../index.php",2,"You don't have permission---->Taking You Back");
exit();
}
Body Content
include footer
if statement works with group webmasters but the other groups get member func non object.
Admintype1 and 2 are custom made groups.