Use CB Auto Action Plugin to create "sub users"

11 years 10 months ago #204180 by ibrent
Hi,
Is it possible to use the CB Auto Action plugin and/or a trigger to create a sub-user or "secondary" type user based on a field during registration?

Here is the scenario:
We are using CBSubs to sell membership levels. Some of our membership levels are Family memberships. The main member specifies the other family members' names during registration. We would like to create separate accounts for those family members automatically so each family member is able to participate in the community. They would need to have the same group as the main member registered them for to allow the proper access on our website.

I thought I had read something about CB Triggers being able to do such a thing a while back?

Please Log in to join the conversation.

11 years 10 months ago #204204 by krileon
Yes, you could use a Code action with PHP method and using the below CB API create a user after the registration trigger.

www.allmysocials.com/directory/tutorials/item/237-create-users-through-api


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 to join the conversation.

11 years 10 months ago #204500 by ibrent
Thanks! I think that will work! Another question, using CB subs I'm assigning users to a user group based on the plan chosen. I need these sub-users added to the same group as the main member. Will I be able to grab the needed variable when the auto action runs? Is it posted with the registration form data like a hidden form field or is there a script that runs after the registration process?

Please Log in to join the conversation.

11 years 10 months ago #204569 by krileon
You're wanting to check that they've selected a certain field at registration? Don't understand what you're asking, please be more specific. If you're wanting to check that they have another usergroup you can use the [gids] substitution with a Contains operator then supply the usergroup ID you're trying to match.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.182 seconds

Facebook Twitter LinkedIn