public $id; // int(11) not_null primary_key auto_increment
public $user_id; // int(11) not_null
-
+
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
{
$gm = DB_DataObject::factory('Group_Members');
$gm->group_id = $group->id;
- $gm->user_id = $user->id;
+ $gm->user_id = $person->id;
$gm->find(true);
if ($state) {
if (!$gm->id) {
$t->find();
- $ret = $arrayof == 'group_id' ? array(0) : array();
+ $ret = array() ;
+ // $ret = $arrayof == 'group_id' ? array(0) : array();
// default member of 'All groups'!!
while ($t->fetch()) {
$this->inAdmin = true;
}
}
+ if ($arrayof == 'group_id' && !count($ret)) {
+ $ret = array(0); /// default if they are not a member of any group.
+ }
+
return $ret;
}