Skip to Content Skip to Menu

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

onAfterUserApproval fires twice

  • socialfan
  • socialfan
  • OFFLINE
  • Posts: 262
  • Thanks: 9
  • Karma: -1
10 years 11 months ago #237239 by socialfan
Replied by socialfan on topic onAfterUserApproval fires twice
The trigger you suggest does not work for backend and the approval trigger send the emails two times. Any chance you can review this for CB 1.9.10?

This is the only way to send different welcome messages to user groups.
I know its an advanced usage scenario but great value adder to professional memebers.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
10 years 11 months ago #237269 by krileon
Replied by krileon on topic onAfterUserApproval fires twice

The trigger you suggest does not work for backend and the approval trigger send the emails two times.

It should work fine. How are you approving users from backend? onUserActive fires when the user account is completely active (confirmed, approved, and enabled). onAfterUserApproval is fired directly after they're approved and is only fired once (confirmed in source code). For backend usage check that [var2] is equal to 1 when using onAfterUserApproval to ensure they're being marked as approved as marking as rejected, etc.. will also fire this trigger.

Any chance you can review this for CB 1.9.10?

No, there will not be another 1.9 release. Next release is CB 1.10.

This is the only way to send different welcome messages to user groups.

The emails support substitutions. Just use IF substitutions to condition the message body. CB 1.10 will also allow HTML in the welcome/pending emails as well if needed. So using CB Auto Actions shouldn't be needed anymore for CB 1.10 usage (you can use IF substitutions now, but no HTML ATM).


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.

  • socialfan
  • socialfan
  • OFFLINE
  • Posts: 262
  • Thanks: 9
  • Karma: -1
10 years 11 months ago #237692 by socialfan
Replied by socialfan on topic onAfterUserApproval fires twice
I used conditional substitutions on the registration mails and it works just fine :)

HOWEVER, the emails contain some extra empty space.
I guess this is caused somehow by the substitutions strings.

Is there a way around this?

Thank you!

Kind regards,

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48474
  • Thanks: 8281
  • Karma: 1443
10 years 11 months ago #237707 by krileon
Replied by krileon on topic onAfterUserApproval fires twice

HOWEVER, the emails contain some extra empty space.
I guess this is caused somehow by the substitutions strings.

Is there a way around this?

Don't understand the issue. Empty substitutions will substitute in as empty and not a space, linebreak, or anything of the sort. You can format your email anyway you like.


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