<%INIT>
my @ids = ($User->id, @{$User->GetMergedUsers->Content});
my @conditions;
for my $type (@WatcherTypes) {
for my $id (@ids) {
push @conditions, "$type.id = $id";
}
}
$$sql = "( ". join(" OR ", @conditions) . " )";
</%INIT>
<%ARGS>
@WatcherTypes => (qw(Watcher))
$User => undef
$sql => undef
</%ARGS>