Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Profile Update logger from Auto Action

  • sirweb
  • sirweb
  • OFFLINE
  • Posts: 226
  • Thanks: 25
  • Karma: 2
6 years 10 months ago - 6 years 10 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?
Last edit: 6 years 10 months ago by sirweb.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 10 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 or Create an account to join the conversation.

  • sirweb
  • sirweb
  • OFFLINE
  • Posts: 226
  • Thanks: 25
  • Karma: 2
6 years 10 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 10 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 or Create an account to join the conversation.

  • sirweb
  • sirweb
  • OFFLINE
  • Posts: 226
  • Thanks: 25
  • Karma: 2
6 years 10 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 10 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum