Profile Update logger from Auto Action

6 years 2 months ago - 6 years 2 months ago #300747 by sirweb
I have created an Auto Action that updates Username and Email based on certain conditions.
The aa works fine, but it is not logged in Profile Update Logger.
These 2 and Predefined are not excluded in PUL.
Do you have a suggestion why these are not logged?

Please Log in to join the conversation.

6 years 2 months ago #300751 by krileon
Replied by krileon on topic Lrofile Update logger from Auto Action
If using a field action it doesn't fire profile update triggers by default since it's easy to get stuck in an infinite loop doing that. The CB Profile Update Logger acts on that trigger to check for changes, which the field action doesn't fire unless it's told to by setting "Save Directly" to "No". Don't do this if your auto action is acting on the profile update triggers though as it'll get stuck in a loop.

As an alternative you can try modifying the user object by reference (the Field action will update the user object) by setting References to Variable 1 under Parameters tab then ensure the profile update logger plugin is ordered after CB Auto Actions in CB > Plugin Management.

As another alternative you can always just manually insert the change into the database using a Query action. Review the _comprofiler_plug_pulogger database table carefully so you can properly construct the insert query.


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

Please Log in to join the conversation.

6 years 2 months ago #300780 by sirweb
Replied by sirweb on topic Lrofile Update logger from Auto Action

krileon wrote: As an alternative you can try modifying the user object by reference (the Field action will update the user object) by setting References to Variable 1 under Parameters tab then ensure the profile update logger plugin is ordered after CB Auto Actions in CB > Plugin Management.


Thanks.
I think Thos would be the best solution.
I need to learn more about this first, is there any documentation you would recommend?

Please Log in to join the conversation.

6 years 2 months ago #300796 by krileon
Replied by krileon on topic Lrofile Update logger from Auto Action

I need to learn more about this first, is there any documentation you would recommend?

Nope, but I've explained all you need to do. Be sure References under Parameters is set to Variable 1 and ensure CB Profile Update Logger is ordered after CB Auto Actions in CB > Plugin Management. I've no idea if this will work though. Depends a lot on what trigger your using as CB Profile Update Logger acts on onAfterUserUpdate and onAfterUpdateUser.


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.

6 years 2 months ago #301040 by sirweb
Replied by sirweb on topic Lrofile Update logger from Auto Action

krileon wrote: Nope, but I've explained all you need to do. Be sure References under Parameters is set to Variable 1 and ensure CB Profile Update Logger is ordered after CB Auto Actions in CB > Plugin Management. I've no idea if this will work though. Depends a lot on what trigger your using as CB Profile Update Logger acts on onAfterUserUpdate and onAfterUpdateUser.


Auto Action plugin is ordered before PU Logger in the plugin list.
I use the trigger onAfterUserProfileSaved.
Action is Set (Field=Value) on email field. (works ok)
Then I marked Variable 1 under Parameters/References. Is that all?

However, email is still not logged.
I dont understand the usage of variables in AA yet, so I have no idea if I am doing wrong or if it just dont work?

Please Log in to join the conversation.

6 years 2 months ago #301055 by krileon
Replied by krileon on topic Lrofile Update logger from Auto Action

I use the trigger onAfterUserProfileSaved.

CB Profile Update Logger does not use that trigger. That trigger is fired after the triggers CB Profile Update Logger acts on resulting in the change never being logged. You need to use onAfterUserUpdate.

Then I marked Variable 1 under Parameters/References. Is that all?

Yes.


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

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds

Facebook Twitter LinkedIn