Skip to Content Skip to Menu

GroupJive Auto Action Variables not available

  • XBOOMX
  • XBOOMX
  • OFFLINE
  • Posts: 149
  • Thanks: 14
  • Karma: 1
1 hour 8 minutes ago #343928 by XBOOMX
Hello,I am currently trying to integrate Community Builder GroupJive with UserPoints using CB Auto Actions.The goal is:
  • User joins a GroupJive group
  • CB Auto Action trigger fires (
    Code:
    gj_onAfterJoinGroup
    )
  • UserPoints awards points automatically
This already works in general.The problem is:
Inside the Auto Action, the trigger variables are empty.I tested the following trigger:
Code:
gj_onAfterJoinGroup
According to the variable list, the trigger should provide:
  • var1 = $row
  • var2 = $group
  • var3 = $user
However, inside the PHP code action:
Code:
var1 type: not set var2 type: not set var3 type: not set
Only the currently logged-in Joomla user can be accessed via:
Code:
\Joomla\CMS\Factory::getApplication()->getIdentity()
Because of this, I currently cannot access:
  • the GroupJive group ID
  • the group name
  • the joining user object from the trigger itself
This means I cannot build a proper “1 user + 1 group = 1 reward” system using a unique keyreference.My question:How can I correctly access the GroupJive group object or group ID inside a CB Auto Action using the
Code:
gj_onAfterJoinGroup
trigger?Is there a different syntax required for:
  • Code:
    $var1
  • Code:
    $var2
  • Code:
    $var3
or are these variables unavailable in Auto Actions PHP code?Any help or example would be greatly appreciated.Thank you very much.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum