Auto Action Trigger -- After User Approval

9 years 6 days ago #264086 by rmwalker
My Config:
CB: 2.0.8
CB AutoActions: 6.2.2.CI.2015.02.23.20.17.19.5.C.183.E.58.E
Joomla 3.4.1 Stable
PHP 5.4.19

I have an Auto Action rule to run some custom code using the trigger "After User Approval". If I approve the user, the code runs as expected. If I reject the user the custom code also runs. In a rejected state I wouldn't expect "After User Approval" to fire, but maybe I've just made a false assumption. I have no conditions defined. Is this the way the "After User Approval" trigger should work? Does it fire regardless of approved vs rejected users?

Please Log in to join the conversation.

9 years 5 days ago #264115 by krileon
Replied by krileon on topic Auto Action Trigger -- After User Approval
It fires on rejection and approval, that's normal. You need to condition the state of the approval. This is done by testing [var2] against the following states.

0 = Pending
1 = Approved
2 = Rejected

So in your case you'd have the following condition.

[var2] 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.

Please Log in to join the conversation.

9 years 5 days ago #264122 by rmwalker
Replied by rmwalker on topic Auto Action Trigger -- After User Approval
That worked perfectly! I know we've got lists of the triggers and their structure. Where do we have a list of what each of their associated variables are?

Please Log in to join the conversation.

9 years 5 days ago #264125 by krileon
Replied by krileon on topic Auto Action Trigger -- After User Approval
The below tutorial has the variables with the triggers, but it's out of date and references CB 1.x usages. Some of changed and the changes are not yet reflected there (time issue, I just don't have the time to update these tutorials right now).

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


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.

9 years 5 days ago #264127 by rmwalker
Replied by rmwalker on topic Auto Action Trigger -- After User Approval
I had found that list. What's missing is what the different variable states actually represent. As in this case where [var2] has the following states.

0 = Pending
1 = Approved
2 = Rejected

Please Log in to join the conversation.

9 years 5 days ago #264128 by krileon
Replied by krileon on topic Auto Action Trigger -- After User Approval
The tutorial will never have that information, sorry. There's no way I could maintain documenting every triggers variables and their values.


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.224 seconds

Facebook Twitter LinkedIn