To check permissions you can do something similar to this...
If you want to display group-specific information on a web page to two groups of your users: regular user group (GroupID 2) and membership group (GroupID 4).
$in_group = is_object($xoopsUser) && in_array(4, $xoopsUser->getGroups());
//display group-specific information
if ($in_group) {
Membership ONLY info Here
} else {
Regular user ONLY infor Here
}
(taken from www.xoops-tips.com)
Optikool