- if ($this->to_group != -1) {
- $c = DB_DataObject::factory('core_group_member');
- $c->setFrom(array(
- 'groud_id' => $this->to_group
- ));
- print_r($c);
- print_r($c->count());exit;
- if (!$c->find(true)) {
-
+ if ($this->to_group_id != -1) {
+
+ $c = DB_DataObject::factory('core_group_member');
+ $c->group_id = $this->to_group_id;
+
+ if (!$c->count()) {
+ //cannot go to second check
+ if (!empty($request['_ignore_group_count'])) {
+ if (!$request['_ignore_group_count']) {
+ $roo->jerr('no_member',array('errcode'=> 100));
+ }
+ } else {
+ $roo->jerr('no_member',array('errcode'=> 100));
+ }