$columnName = $finder->columnSqlName('secondary_group_ids');
$positiveMatch = ($key == 'secondary_group_ids');
$parts = [];
foreach ($value AS $part)
{
if ($positiveMatch)
{
$parts[] = 'FIND_IN_SET(' . $finder->quote($part) . ', '. $columnName . ')';
}
else
{
$parts[] = 'FIND_IN_SET(' . $finder->quote($part) . ', '. $columnName . ') = 0';
}
}
if ($parts)
{
$joiner = $positiveMatch ? ' OR ' : ' AND ';
$finder->whereSql(implode($joiner, $parts));
}
return true;