2
You can use $xoopsUser->getGroups() to get an array with the groups, a user belongs to and then see if the desired group is in that array.
If you only have the name of the group and not the ID, you'll have to look into the XoopsGroupHandler::getObjects() method.