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?
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.
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.