onAfterUserUpdate is fired when a user is updated from frontend and onAfterUpdateUser is fired when a user is updated from backend. Use either of those or both depending on your needs. Their variables are all the same with var1 and var2 being the up to date user object and var3 being the object before changes were applied. So you can check if a field changed its value with the following condition
[var1_field_name] Not Equal To [var3_field_name]
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.
This is exactly how we do it with most of our Auto Actions.
However, in this case, neither the frontend user nor backend admin initiates the update but an application.
The app simply switches a flag in comprofiler from 1 to 0 because a subscription has expired.
This hides a CB Tab from being display and it executes properly.
But consequently an Auto Action is required to do some housekeeping:
1) unpublish a CB Content Module
2) delete some content from user's profile
For this transaction we're looking for correct type of trigger listening to DB updates.
onAfterUpdateUser seems not to work here.
I can't help you in regards to your application updating users. Your application isn't firing CB triggers when making the changes, which it's probably just doing directly on the database. This means CB Auto Actions can't do anything for you.
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.