Which is fired first? Welcome email or trigger?

12 years 8 months ago #174276 by apdt
Ok, I tested again without any condition and it still doesn't work. I still the firstname+lastname as the username in the email.

The query itself works, I tested them in phpMyAdmin and when I click the 'Approve' button in CB > User Management the username is updated to the membership number.

I have tried onUserActive, onBeforeUserActive and even before/after user sync but none worked.

I don't understand why it's a trial and error process. I know you have a list of triggers in your tutorial but there must be a developer documentation that tells exactly when each trigger fires.

Please Log in to join the conversation.

12 years 8 months ago #174333 by krileon

I have tried onUserActive, onBeforeUserActive and even before/after user sync but none worked.

All the triggers you've tried are the right triggers. They all execute before user approval. CB Queries is updating the database; it does NOT update the user object, which is why the email does not contain the new username. This is why CB Fields exists, it acts directly on the user object.

but there must be a developer documentation that tells exactly when each trigger fires.

No such thing exists.


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.

12 years 8 months ago #174422 by apdt
Hmm .. with CB Fields I can't have complex query. I need to get the next member number first before assigning it to the username.

Anyway, I wanted to hide the username from the welcome email and use [EMAIL] and [PASSWORD] tags instead of [DETAILS]. However, the [PASSWORD] tag is not substituted in the email, it's literally shown as '[PASSWORD]'.

Require approval = Y
Require confirmation = N
Auto-generate password = Y

Please Log in to join the conversation.

12 years 8 months ago #174487 by krileon

Hmm .. with CB Fields I can't have complex query. I need to get the next member number first before assigning it to the username.

Then you'll probably need a new integration to handle your specific case.

Anyway, I wanted to hide the username from the welcome email and use [EMAIL] and [PASSWORD] tags instead of [DETAILS]. However, the [PASSWORD] tag is not substituted in the email, it's literally shown as '[PASSWORD]'.

The password substitution can only be used in the Pending email unless password generation is used in which case it should be in the Welcome AND Pending email. Confirm this working fine on CB 1.7.


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.

Moderators: beatnantkrileon
Time to create page: 0.285 seconds

Facebook Twitter LinkedIn