public $group_id; // int(4) primary_key not_null
public $profile_id; // int(4) primary_key not_null
public $is_admin; // tinyint(1)
- public $uri; // varchar(255)
+ public $uri; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
'is_admin' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'is this user an admin?'),
- 'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'),
+ 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
),
);
}
- function pkeyGet($kv)
- {
- return Memcached_DataObject::pkeyGet('Group_member', $kv);
- }
-
/**
* Method to add a user to a group.
* In most cases, you should call Profile->joinGroup() instead.
$act->id = $this->getURI();
- $act->actor = ActivityObject::fromProfile($member);
+ $act->actor = $member->asActivityObject();
$act->verb = ActivityVerb::JOIN;
$act->objects[] = ActivityObject::fromGroup($group);