function onGroupCreate($group) { if (!self::kunenaOnline()) { return; } if (JRequest::getInt('kunenaforum', 0) < 0) { return; } $catid = self::getForumCategory($group->categoryid); if ($catid === false) { return; } $category = new KunenaForumCategory(); $category->set('parent_id', $catid); $category->set('name', $group->name); $category->set('description', $group->description); $category->set('headerdesc', $group->description); $category->set('accesstype', 'jomsocial'); $category->set('access', $group->id); $category->set('published', $group->published); $success = $category->save(); if (!$success) { JFactory::getApplication()->enqueueMessage(JText::sprintf('PLG_COMMUNITY_KUNENAGROUPS_GROUP_CREATE_FAILED', 'notice')); return; } $category->setModerator($group->ownerid, 1); }