Skip to Content Skip to Menu

GroupJive - AutoAction - onAfterJoinGroup - correct event

  • zabey
  • zabey
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
7 years 8 months ago - 7 years 8 months ago #291888 by zabey
Hi

There is 3 types of groups.

Open, approval, Invite

Open - user join group independently (fire event onAfterJoinGroup)

Approval - user join group (fire event onAfterJoinGroup) -> owner approve him (which evetn fire here?)

(not tested now)
Invite - owner invite user -> user accept (which evetn fire here?)
Last edit: 7 years 8 months ago by zabey.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 8 months ago #291907 by krileon
As long as they're joining the group from frontend via join button the onAfterJoinGroup trigger will fire. Even for accepting invites unless the invite accept is during registration in which case only gj_onAfterCreateUser is fired (which fires anytime a group user is created whether frontend or backend).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • zabey
  • zabey
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
7 years 8 months ago #291916 by zabey
i try gj_onAfterCreateUser
it work like onAfterJoinGroup trigger - user joun to approval group (fire event gj_onAfterCreateUse but there is no approve now) -> owner can aprove user.

i need event only after aprove

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 8 months ago #291930 by krileon
There is no event specifically for approval. The below usage can condition for that state though.

Global
Triggers: gj_onAfterUpdateUser
Conditions
1: [var1_status] Greater Than or Equal To 1
2: [var2_status] Equal To 0

var1 is the updated GJ user object while var2 is the old GJ user object. Their status before approved should be 0 (pending) while they become 1 (active) after becoming approved.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • zabey
  • zabey
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
7 years 8 months ago #291948 by zabey
ok, it wort for aproval


Can you tell me correct event and conditions for open group and invite?
event same - then user join group (open - then join, approval - after aprove, invite - after accept invite)
and will be conflict in the events then invite.

so i see next routes:

open group:

user press join -> he added to group as normal user (this event)
user resive invite -> user accetp invite -> he added to group as normal user (this event)

aproval group :
user press join -> he added as pending user -> owner aprove him -> he added to group as normal user (this event)
user resive invite -> user accetp invite -> he added as pending user -> owner aprove him -> he added to group as normal user (this event - work gj_onAfterUpdateUser with status conditions)

invite group:
user resive invite -> user accetp invite -> he added to group as normal user (this event)


Also i need evet then user leave group - (itself or deleted by owner/admin)

i need know - user id (i take it in [user_id]) and GJ group id (now i take it in [var1_group])

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 8 months ago #291972 by krileon
gj_onAfterUpdateUser and gj_onAfterCreateUser always fire regardless of how they've joined a group. The first one fires when their group user object is updated (so when they get approved). The second one fires when they're created. The gj_onAfterJoinGroup trigger only fires if the user manually joins using the join button. Condition them accordingly (see my above example).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum