UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

FD Table - Cluster error

Alexandre Cayer · ·
10:10 AM Friday, 14 November 2014
None
Hi Guys,

I have only use your table object once and never with this type... could you have a look, i just wrote it from scratch dho :P

public function onRegisterAfterSave(&$post, &$user)
{
$desc = $this->params->get('default');

$group = Foundry::table('Cluster');

$group->category_id = '4';
$group->cluster_type = 'group';
$group->creator_type = 'user';
$group->creator_uid = $user->id;
$group->title = $post['name'];
$group->description = $desc;
$group->alias = $post['permalink'];
$group->target_id = $usertoassign;
$group->state = 1;
$group->featured = 1;
$group->type = 3;
$group->parent_id = 0;
$a=JFactory::getDate()->toSql();
$group->created = $a;

$group->store();

$data = array('permalink' => $post['permalink']);
$table = Foundry::table('Cluster');
$table->load($data);

$cluster = Foundry::table('ClusterNode');

$cluster->cluster_id = $table->id;
$cluster->uid = $user->id;
$cluster->type = 'user';
$cluster->created = $a;
$cluster->state = 1;
$cluster->owner = 1;
$cluster->admin = 1;
$cluster->invited_by = 0;

$cluster->store();
}
The replies under this section are restricted to logged in users or users with an active subscription with us