$roo->jdata($core_group->memberCount());
}
}
+ $cgm = DB_DataObject::Factory('core_group_member')->tableName();;
+ $this->selectAdd("
+ (
+ SELECT
+ count(user_id)
+ FROM
+ {$cgm}
+ WHERE
+ {$this->tableName()}.id = {$cgm}.group_id
+ )
+ AS group_member_count
+ ");
}
function toEventString() {
{
$gm = DB_Dataobject::factory('core_group_member');
$gm->group_id = $this->id;
+ $gm->autoJoin();
+ $gm->whereAdd('join_user_id_id.active = 1');
+ //PDO_DAtaObject::DebugLevel(1);
return $gm->count();
}
function addMember($person,$roo = false)
{
if ($this->name == "Empty Group") {
- $roo->jerr('Cannot add the person into the empty group');
+ $roo->jerr('Cannot add the person into Empty Group');
}
$gm = DB_Dataobject::factory('core_group_member');
$gm->group_id = $this->id;
// groups databse is hard coded to person.. so this should not be used for other tables.????
$p = DB_Dataobject::factory( 'core_person' );
-
-
$p->whereAdd('id IN ('. implode(',', $ids) .')');
$p->active = 1;
function initGroups()
{
-
+
$g = DB_DataObject::factory($this->tableName());
$g->type = 0;
$g->name = 'Administrators';