Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Auto Actions with GroupJive and Usergroups

  • phalanx80
  • phalanx80
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
8 years 6 months ago #280302 by phalanx80
Hi
i'm trying to join a user to a Usergroup (with specific Level Access) when the same user join a specific group in GroupJive.
So for example user John join to group (GroupJive) Community
then automatically an autoaction should assign to John a specific usergroup which grant access to relative content.
Anyone know how to do this task?

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 6 months ago #280312 by krileon
Replied by krileon on topic Auto Actions with GroupJive and Usergroups
Act on the gj_onAfterJoinGroup trigger with a Usergroup action and add to their usergroups as needed. You can condition against the group they're joining by conditioning variable 2 as follows.

[var2_id] Equal To GROUP_ID_HERE

For that trigger var1 is the group user object, var2 is the group object, and var3 is the CB user object.


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.
The following user(s) said Thank You: phalanx80

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

  • phalanx80
  • phalanx80
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
8 years 6 months ago #280359 by phalanx80
Replied by phalanx80 on topic Auto Actions with GroupJive and Usergroups
Thank you for your answer.
Now for Open group the workflow is perfect. Is not the same with group where admin needs to approve the user.

This my scenario:
Group 1 -> Users who join needs to be approved by admin
User joins Group 1, then, only when admin approves this user, the auto action trigger should work.
At now when user joins the Group 1 auto action is activated and a access level is assigned to user without admin approval.
the autoaction trigger is gj_onAfterJoinGroup.
So my user can access to restricted content without admin approvation.

There is a way to obatin in GroupJive something similar to onAfterUserApproval in CB core?

Otherwise there is a way to assign an access level only when the user is approved to the relative group in GroupJive?
Thanks in advance

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 6 months ago #280362 by krileon
Replied by krileon on topic Auto Actions with GroupJive and Usergroups
In that case you'll want to act on both gj_onAfterUpdateUser and gj_onAfterCreateUser instead. var1 of both of those is the GJ user object. You can condition against the group and their current status in the group as follows.

[var1_group] Equal To GROUP_ID_HERE
[var1_status] Equal To 1

This means when they join or have been approved and their status is 1 (active) the action will execute. Note this will function on backend as well, but if that's a problem it is possible to condition against doing so as follows.

[cb:if application_context="frontend"]1[/cb:if] Equal To 1


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.
The following user(s) said Thank You: phalanx80

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

Moderators: beatnantkrileon
Powered by Kunena Forum