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?
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.
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
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.