Difference between revisions of "OnGroupJoin"

(Created page with "===Description=== This event trigger when a user join a group. @since 1.1 ===Params=== *'''Group'''' - group object that is passed by reference, consist of the following dat...")
 
(Description)
 
Line 1: Line 1:
 
===Description===
 
===Description===
This event trigger when a user join a group.
+
This event is triggered when a user joins a group.
  
 
@since 1.1
 
@since 1.1

Latest revision as of 07:21, 9 March 2013

Description

This event is triggered when a user joins a group.

@since 1.1

Params

  • Group' - group object that is passed by reference, consist of the following data :
  1. id, the id of the group
  2. ownerid, the user id of the group owner
  3. categoryid, the category type id.
  4. name, name of the group.
  5. description, the group description.
  6. email, the group's email.
  7. website, the group's website.
  8. created, date when the group is created.
  9. approvals, show whether the groups require approval or not when a user join (0 = no need aproval, 1 = requires approval).
  10. avatar, the group's avatar location.
  11. thumb, the group's thumbnail avatar location.
  12. published, the publish status of the group (0 = unpublished, 1 = published).
stdClass Object
(
    [id] => 51
    [ownerid] => 66
    [categoryid] => 1
    [name] => test
    [description] => testing group
    [email] => test@test.com
    [website] => www.test.com
    [created] => 2009-02-10 04:14:11
    [approvals] => 0
    [avatar] => components/com_community/assets/group.jpg
    [thumb] => components/com_community/assets/group_thumb.jpg
    [published] => 1
)


  • Member Id - int, User ID of the user who made a request to join a group.

Example

function onGroupJoin( &$group, $memberid ) 
{
   /*
      perform your triggered action here.
   */
}


Limitations

For now, onGroupJoin event only affects the frontend join. If an admin adds a user to a group, that event is not triggered.