×

Error

Please login first

Repeat welcome emails are being sent

6 years 7 months ago #297720 by wrongjon
Repeat welcome emails are being sent was created by wrongjon
Hi

We have disabled the normal welcome email and are using Auto Actions to send one of 3 customised welcome emails, depending on what they entered in certain fields.

This works nicely and we send the email using the OnAfterUserConfrmation event.

Trouble is one users seems to have bookmarked the confirmation code url and they are using that each time they visit the site and are receiving a new welcome email each time.

I know this is user error but our code should somehow check if the person WAS ALREADY confirmed before sending another welcome email.

I'm trying to think on what trigger we can do this check? if we stick to OnAfterUserConfrmation it will be too too late wont it to see if they were already confirmed BEFORE they clicked the confirm link again?

Can you think of a better way to catch this scenario eg if we could use a beforeUserConfirm could that check the status of confirmed before actually confirming the user and then only sending the email if they werent already confirmed but are now they clicked the url?

sorry if confusing..

thank you

Please Log in to join the conversation.

6 years 7 months ago #297723 by wrongjon
Replied by wrongjon on topic Repeat welcome emails are being sent
Found here

forge.joomlapolis.com/issues/4237

onBeforeUserConfirmationRequest

So guess I could add an action (type = action) with this trigger onBeforeUserConfirmationRequest to check the value in the CONFIRMED field to see if already confirmed.... and if NOT already confirmed then call my other three actions that check things and send welcome email.

Then if I remove the trigger OnAfterUserConfrmation from each of these 3 email actions they wont run unless this first action tells them to

Sound good?

Please Log in to join the conversation.

6 years 7 months ago - 6 years 7 months ago #297726 by krileon
Replied by krileon on topic Repeat welcome emails are being sent
onAfterUserConfirmation fires whether they've been confirmed or not. It's the trigger used for the confirmation page display. I suggest using the onAfterUserConfirm trigger which is only fired if confirmation actually changes. If using onAfterUserConfirm I also suggest adding the below condition.

[var2] Equal To 1

This will ensure it only emails if their confirmation state is changing to 1.


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 to join the conversation.

6 years 7 months ago #297728 by wrongjon
Replied by wrongjon on topic Repeat welcome emails are being sent
Hi Kyle

Thanks so much for fast reply.

Did you mean [var2_confirmed] Equal To 1

Please Log in to join the conversation.

6 years 7 months ago #297733 by krileon
Replied by krileon on topic Repeat welcome emails are being sent
No, var2 for onAfterUserConfirm is $state, which is the confirmation state the user is being changed to. It'll be either 1 or 0.


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 to join the conversation.

6 years 7 months ago #297741 by wrongjon
Replied by wrongjon on topic Repeat welcome emails are being sent
OK thanks so much for confirming. Will give it a try soon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.416 seconds

Facebook Twitter LinkedIn