Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Conditional in Auto Action for several user groups

5 years 3 weeks ago #315520 by kathymerrill
I would like to make an Auto Action that sends an automated Welcome email when our moderator changes the usergroup of a user from Prospective Member to Current Member. I have been playing around with "onAfterUpdateUser," but cannot figure out how to make the conditional work. It cannot just be initial variable different to current variable, because we have several usergroup statuses that could fall under this and are also updated in the same way by moderator (e.g. Former member, Alumni Member).
How can I make a conditional that picks up only the value of "Current Member"?

I tried a different way by just making a yes/no variable with "Send Welcome email" and trying v1_sendwelcomeemail not equal to v3_sendwelcomeemail, but it also does not work.

Any suggestions on what I am doing wrong or the easiest way to do this?

Thank you!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
5 years 3 weeks ago #315533 by krileon
You've no download history for CB Auto Actions so I assume the version you're using is at least a year old. With latest release there's a built in condition for checking against usergroups and viewaccesslevels directly, but trying to compare old values to new values in this regard is still going to be difficult. That trigger has the new user object in Variable 1 (var1_ substitutions prefix) and the older user object in Variable 3 (var3_ substitutions prefix). You maybe able to still use the "gids" variable contained in a user object which is typically an array of usergroup ids the user has. So for example [var1_gids] gives current usergroups and [var3_gids] gives older usergroups. Beyond that I can provide no further suggest as you do not have an active subscription for CB Auto Actions.


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.

5 years 3 weeks ago #315542 by kathymerrill
Replied by kathymerrill on topic Conditional in Auto Action for several user groups
Ah, good to know! I just currently took over a volunteer position at a non-profit club, and the website handover documentations is not well updated. I will see if we can get an active subscription as there is some budget. Thanks for your help.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum