How to send email on user account deactivation?

Ashutosh Pandey asked on July 30, 2020 18:05

We are working on Kentico 10 (Portal Engine). We can send emails on registration, forgot password etc.

Is it possible to send email to users if their account is deactivated from admin?

We can create a new email template but how to connect to deactivation?

Correct Answer

Brenden Kehren answered on July 30, 2020 18:27

Cross-posted on StackOverflow as well.

Out of the box, this doesn't happen. You can create a global event handler for the User object and check to see if the user is enabled or not, then send an email based on a template for this.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Dmitry Bastron answered on July 30, 2020 18:22 (last edited on July 30, 2020 18:23)

Hi Ashutosh,

When you amend the user record in CMS admin, the system will fire Update event for UserInfo object. You can hook to this event and in the event handler code check if user has become inactivated send out your email based on the template using Kentico API.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.