Skip to Content Skip to Menu

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

Changing an ACL after a membership expires

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 9 months ago #257209 by krileon
Replied by krileon on topic Changing an ACL after a membership expires

So how would I have known about the trigger variables?

You would need to find in source where the trigger is fired and study its variables. We also have a triggers tutorial below that lists most of them with their variables, but without using an IDE that can navigate PHPDOC it's sometimes hard to figure out what a variable is.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

I understand the unlimited nature of Auto Actions, but how about explaining how I'd use the variables to the triggers and for each module used (e.g. CBSubs) what each value would mean?

Each variable sent by a trigger is incremented. So the first variable sent by a trigger is var1, then var2, then var3, etc.. all the way up to a maximum of var10. CB Auto Actions describes this on a few of its inputs. What those variables are entirely depends on the trigger it self, which CB Auto Actions doesn't know until the trigger fires.


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: nant

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

9 years 2 months ago #268961 by MarylandShallIssue
Replied by MarylandShallIssue on topic Changing an ACL after a membership expires
Hi, I'm resurfacing this thread as my question is tied to the solution outlined here. If you need me to start a new thread, I can do so.

The solution outlined has worked to date, but we now have a need to check to see if a plan ID is renewed AND if the there is another CB field set to a specific value. This will gate our setting of the ACL.

So what I tried was:
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A
Conditional 3: [cb_fieldname] Equal To 'Some Value'

This doesn't seem to work and I suspect it's because the trigger only takes certain variables. Then again, I had assumed that checking a users custom CB fields would be something the action would be able to do as part of the conditional. Am I on the right track here? If not, what's the best way to accomplish this?

Thanks!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago #269002 by krileon
Replied by krileon on topic Changing an ACL after a membership expires
You should be able to condition for field values fine, but you need to be sure the field is set to the expected value before subscribing. If the plan it self that you're conditioning off of is setting that field value then it won't work due to load/execution order. The value also needs to match exactly and that can mean many different things depending on the actual type of field.


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