Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB-Auto Actions: User ID with trigger After First Login

8 years 11 months ago - 8 years 11 months ago #272920 by davidmarshall15
Hello,

When a new user registers, a welcome message is sent via PM using CB Auto Welcome.
I don't want to send a PM notification by email for this welcome message, so I have changed the default uddeim notification to Never.

When the user first logs in, I want to set their notification to When Offline and I am trying to do this with CB Auto Actions.

I have an action with trigger After First Login, the type is Query and the query is:
Code:
update #__uddeim_emn set status = 2 where userid = [user_id];

I have tested by changing [user_id] to an existing ID and that works, so I assume (cant find this trigger in the documentation) [user_id] is not available with this trigger?

Is their an alternative trigger/method I can use to achieve the same thing?

Thanks
David
Last edit: 8 years 11 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #272962 by krileon
Your trigger is fine, but your query has absolutely no quotes. Substitutions are typically strings and should be treated as such with ' quotes. Tables and columns should be surrounded with `. Your query would be as follows.

Code:
UPDATE `#__uddeim_emn` SET `status` = 2 WHERE `userid` = '[user_id]'

Now chances are the reason it's not working is they don't have a row to update to begin with. I believe UddeIM only creates one when it needs to, but I could be mistake; you'd need to post in the UddeIM forums for clarification on best way to do this, but there's probably an API call you can use in a Code action with Method set to PHP to properly do this with API.

www.joomlapolis.com/forum/25-uddeim-plugin-and-component


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.

8 years 11 months ago - 8 years 11 months ago #272983 by davidmarshall15
Replied by davidmarshall15 on topic CB-Auto Actions: User ID with trigger After First Login
In this case user who have never logged in, do have rows in #__uddeim_emn
So I have updated the query and will see how it goes.

Thanks
Last edit: 8 years 11 months ago by davidmarshall15.

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

8 years 11 months ago #272998 by davidmarshall15
Replied by davidmarshall15 on topic CB-Auto Actions: User ID with trigger After First Login
I can confirm that adding quotes as recommended solves this.

Thanks
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum