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 🛍️ Intro Black Friday Offer for a lifetime*

Manual Trigger Auto Action to set field for a group of users

  • wbuk
  • wbuk
  • OFFLINE
  • Posts: 116
  • Thanks: 8
  • Karma: 1
5 years 4 months ago - 5 years 4 months ago #313267 by wbuk
Combed through the forums but unable to find an answer to this, so sorry if this has been asked before!

We need an auto-action that automatically sets a user's custom field based on another field. To limit the action so it only changes a certain group of users (and not others), we set the Access to "Group A". When the appropriate triggers are set, it works fine. Auto Action looks like this:

Trigger: onAfterUserLoginSuccess
Type: Field
User: Automatic
Access: Group A

However sometimes we needed to manually fire the auto-action (user does not trigger it because they did not perform the trigger action, eg logging in). Clicking on the Internal Action URL (with no triggers set) for the above auto-action gives the error that I do not have access (because I am not in Group A).

However, even if I could, this triggers the action to set the field of the user triggering it - ie my profile. How do we trigger the auto action to change the field of a group of other users?

Edit: So further combing pointed me towards CB Auto Actions > Parameters which contains "Internal General URL" and "Internal Users URL". I've tried changing the above auto-action's trigger to "General", clicked on the Internal General URL link but it still doesn't work.

Edit 2: Got it to work now. Please delete this post.

Web Buster UK Ltd
Last edit: 5 years 4 months ago by wbuk.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48554
  • Thanks: 8292
  • Karma: 1445
5 years 4 months ago #313271 by krileon
Manually executing an auto action will not work unless Triggers is set to None. onAfterUserLoginSuccess trigger also does not provide a user object so you may need to set User to Self, but Automatic should fallback to Self if it finds nothing. As for looping every user through the auto action you'd need to give it the Internal Users trigger then run the Internal Users URL within CB Auto Actions > Parameters, but you may want to utilize the batching feature there to prevent it from trying to run on all your users at once.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum