}
if ($this->to_group != -1) {
- $c = DB_DataObject::factory('core_group_member');
- //$c->groud_id = $this->to_group;
-
- $c->setFrom(array(
- 'groud_id' => $this->to_group
- ));
-
- //if (!$c->find(true)) {
- //
- //}
-
- print_r($this->to_group);
- //print_r($c);
- print_r($c->count());exit;
+
+ $c = DB_DataObject::factory('core_group_member');
+ $c->whereAdd("group_id = {$this->to_group}");
+
+ if (!$c->find(true)) {
+ if (!empty($request['_ignore_group_count']) && !$request['_ignore_group_count']) {
+ $roo->jerr('not found');
+ }
+ }
}
}