Developer forum

Forum » Development » Send User Notification Email only when user is activated by Admin from backend

Send User Notification Email only when user is activated by Admin from backend

Aung Chan Myae
Reply

Hi,

I am trying to send the email only when the admin activate the user from backend.

Is there any suggestion to do this?

Best Regards,

ACM


Replies

 
Kevin Steffer
Kevin Steffer
Reply

Hi Aung Chan Myae,

We used a Notification Subscriber on User Saved.

Best regards
Kevin

 
Aung Chan Myae
Reply

Hi Kevin,

I tried with 'OnBeforeSave' but the problem is that I want to send the email only when the user is activated from the backend by admin.

I also tried the user saved notification.

Please check the attached image.

What I found is that this subscriber called twice when the user is registered from the website.

First time is that IsActive field return true and Second time IsActive field retrun false.

Please advise me .

Regards,

ACM

OnBeforeSaveUserNotification.png
 
Nicolai Pedersen
Reply
This post has been marked as an answer

You can check if ExecutingContext.IsBackEnd (https://doc.dynamicweb.com/api/html/6bc9a5fd-242e-2ff9-723d-ebfc7ec75ef3.htm) is true. Then it is in the backend.

Votes for this answer: 2
 
Tin Ma Ma
Reply

Hi
There is User notification e-mail setting in Extranet Module. When Admin activate the user account, user notification email should sent to user.
Unfortunately, this email setting doesn't work.
Regards,

Tin Ma Ma

Image_1.png
 
Nicolai Pedersen
Reply

Hi Tin Ma Ma

Is your last question in any way related to the rest of this thread? Not sure I understand - unless it was a general question...?

Thanks for clarifying, Nicolai

 
Tin Ma Ma
Reply

Hi Nicolai,

Regard to Aung Chan Myae's question, I think  the User notification email setting in Extranet Module can be used.
Therefore I checked and tested the settigng .And then I reported under this thread. Sorry for confusing smiley

Regards,
Tin Ma Ma

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

Notifications defined with Extranet module cannot be processed with User Management in backed. They are performed with Extranet module frontend only.

I've tested solution based on last DW95 and uses Rapido 3.0 template set and see the approval is done properly:

1. by admin: Notification mail to admin - Approval by the admin via link in the mail – Notification mail to created user (OK);

2. by user: Nonfirmation mail to created user + Notification mail to admin - Approval by the user via link in the mail – Notification mail to the user (OK)

I see appropriate 'AdminAccountEmailConfirmation' template has not correct link on the button - admn is launched instead of user approval precessing. New TFS 58015 has been created against the issue. Workaround - use 'UserAccountEmailConfirmation' template or update the first one by yourself. 

BR, Oleg QA

 
Asdis Gudmundsdottir
Asdis Gudmundsdottir
Reply

Hi Oleg, 

If the approval is made by the admin, how is the notification mail sent to the user?
We are testing with our development environment and we are not receiving user notification email, only admin. 

Best regards, 

Ásdís

 

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi Asdis,

Please, use appropriate template for admn notification. I've checked the feature on DW9.8.0 and it work properly - proof.

BR, Oleg QA

 

 
Asdis Gudmundsdottir
Asdis Gudmundsdottir
Reply

Thank you :)

 

You must be logged in to post in the forum