4
Feel kinda foolish now, should have expected this...
I got the following code to work:
//show proper homepage module for this users group level
global $xoopsUser;
if(!empty($xoopsUser)) {
$group = $xoopsUser->getGroups();}
if ((in_array(1, $group)) OR (in_array(2, $group))) {//user is registered so show member homepage
header('Location: '.XOOPS_URL.'/modules/tinycontent2/');
exit();
}
else {//user is unregistered so show public homepage
header('Location: '.XOOPS_URL.'/modules/tinycontent/');
exit();
}
Now the problem is this - if the visitor logs in or out while on the homepage, the application instinctively returns him to the same page after logging (but of course now it is the wrong module for his group).
Any ideas on modifying the redirect mechanism? Or would it make more sense to undo these mods and set the default module to a one-page module with the above code?
Thanks
Todd