3
Quote:
Mithrandir wrote:
global $xoopsUser;
$groups = $xoopsUser ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
if (in_array($group_id_you_want_to_check, $groups)) {
//show links
}
Thanks Mithrandir! I've got to spend some time in the developer documentation!
I'm having a problem getting all user groups though. When I run the following code ...
global $xoopsUser;
$groups = $xoopsUser ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
print_r($groups);
I only get the first three groups. Here's what I get as output ...
Array ( [0] => 1 [1] => 2 [2] => 4 )
I know the user is in five groups ... the last two are the ones I'm using to check. Any ideas?
Thanks
David