Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

using Auto Actions for login actions

12 years 2 months ago #214280 by RomainFaure
using Auto Actions for login actions was created by RomainFaure
Hello!

I have just started to work with Auto Actions. Let me explains what I want to do:

"When a user from usergroupA logs in, I want fieldname1 from table1 to be set to value1"

Then, I guess the proper way to do it with Auto Actions is to set an Auto Actions with:

- Type = Query (as we wan't to update the database)
- Triggers = onDuringLogin (for instance, or Before User Login)
- User = Automatic (I don't understand this part actually)
- Access = Everybody
- Conditional = [usergroup] = usergroupA
- query = "UPDATE table1 SET fieldname1=value1 WHERE id_field=[his id]

By now, I just dont know what to write for [usergroup] and [his id]. I did not find any documentation about those values: if there is one it would be usefull.

Many Thanks in advance!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214287 by krileon
Replied by krileon on topic Re: using Auto Actions for login actions
Don't add an access check on conditionals, that's specifically why there's an access parameter. Simply set it to the usergroups you want the trigger to apply to. As for the ID I assume it's user id, which you can substitute in with [user_id]; please see below tutorial for further substitution usage information.

www.allmysocials.com/directory/tutorials/item/233-substitution-usage


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.

12 years 2 months ago #214331 by RomainFaure
Replied by RomainFaure on topic Re: using Auto Actions for login actions
Hi,

Thank you for the answer. I read the article, and I still have questions:

"The user [username] lives in [cb_citystate] and his name is: [name]."
[username] is specific to the current user: it should correspond to a joomla parameter, for instance $user object etc. Then, do you have a list for all the available FIELD_NAME and their correspondance in joomla?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214346 by krileon
Replied by krileon on topic Re: using Auto Actions for login actions

Then, do you have a list for all the available FIELD_NAME and their correspondance in joomla?

Navigate to CB > Field Management and that's a list of all fields you can substitute.


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