isValid()) { new mb_exception("User ID " . $id . " invalid."); return array(); } $groups = $user->getGroupsByUser(); if (!is_array($groups)) { new mb_notice("User " . $id . " is not member in any group."); return array(); } new mb_notice("User " . $id . " is member of " . count($groups) . " groups."); if (in_array(self::$mb_group_id, $groups)) { return array(self::$mb_group_id); } return array(); } } ?>