Skip to Content Skip to Menu

CB Auto Actions does not trigger on joomla_OnUserAfterSave

  • cbrace
  • cbrace
  • ONLINE
  • Posts: 82
  • Thanks: 3
  • Karma: 0
1 year 1 month ago #333595 by cbrace
Hi all,

I have configured an auto action that should trigger when a user is saved. The use case is that I set a field value on the CB profile when that user blocked from Joomla user management. Am using Joomla 3.x for this.

The update works whenever I do a save on the CB user but not on the Joomla user record.

Please assist, kind regards,

Rogier

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
1 year 1 month ago #333596 by krileon
The trigger needs to be exactly as specified in Joomla prefixed with joomla_. This can sometimes be case sensitive. So the trigger should be exactly as follows.

joomla_onUserAfterSave

Next be sure the CB Auto Action Joomla plugin in Extensions > Plugins is public and published as it's responsible for binding to Joomla events. This I suspect is likely where your issue is.


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.

  • cbrace
  • cbrace
  • ONLINE
  • Posts: 82
  • Thanks: 3
  • Karma: 0
1 year 2 days ago #333921 by cbrace
Sorry about the late reply.

Thanks for that, I have set the trigger and checked the plugins. All is the same as yours. When enabling or disabling a user it still doesn't trigger.

I have the following trigger criteria set via the condition tab;

Field: Block
User: Action User
Operator: Equal
Value: 0

This should result in the following update via the action tab;

Field cb_disabled
Operator: Set (field=value)
Value: 0
Translate value: No
Save directly: Yes
User: blank

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
1 year 2 days ago #333924 by krileon
If the user is being saved in CB then CB will override that. Joomla Save > Your Action > CB Save is basically what you're currently doing. I suggest using CBs trigger instead which is as follows.

Registration
Backend: onAfterNewUser
Frontend: onAfterUserRegistration

Profile Edit
Backend: onAfterUpdateUser
Frontend: onAfterUserUpdate

I'm not sure why you need cb_disabled though. The users blocked state is available in CB as well. What are you trying to do with cb_disabled that you need the blocked state doubled?


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.

  • cbrace
  • cbrace
  • ONLINE
  • Posts: 82
  • Thanks: 3
  • Karma: 0
1 year 2 days ago #333928 by cbrace
Goal is to see on a profile that a user is blocked. Is there a different approach?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
1 year 2 days ago #333932 by krileon
Yes, you can just substitute in [block] into a Custom HTML field. You can use IF substitutions to customize it further. Example as follows.
Code:
[cb:if block="1"]Blocked[cb:else]Not Blocked[/cb:else][/cb:if]


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

Facebook Twitter LinkedIn