public function checkGroup($userid, $groupcodes)
{
$site = Route::current() ? Route::input('site', Input::get('site', 'default')) : 'default';
$context = $this->context->get(false);
$context->setLocale($this->locale->getBackend($context, $site));
$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/group');
$search = $manager->createSearch();
$search->setConditions($search->compare('==', 'customer.group.code', (array) $groupcodes));
$groupItems = $manager->searchItems($search);
$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/lists');
$search = $manager->createSearch();
$expr = array($search->compare('==', 'customer.lists.parentid', $userid), $search->compare('==', 'customer.lists.refid', array_keys($groupItems)), $search->compare('==', 'customer.lists.domain', 'customer/group'));
$search->setConditions($search->combine('&&', $expr));
$search->setSlice(0, 1);
return (bool) count($manager->searchItems($search));
}