}
- if ($this->to_group != -1) {
+ if ($this->to_group_id != -1) {
$c = DB_DataObject::factory('core_group_member');
- $c->whereAdd("group_id = {$this->to_group}");
+ $c->group_id = $this->to_group_id;
if (!$c->count()) {
if (!empty($request['_ignore_group_count'])) {