Send email to administrator when new user created

Topics: Business Logic Layer
Jun 13, 2010 at 3:45 AM
Edited Jun 13, 2010 at 3:46 AM

I see that there is an extension available to send email when a new comment is posted (App_Code\Extension\SendCommentMail.cs).  This is based on the event occuring

Post.CommentAdded += new EventHandler<EventArgs>(Post_CommentAdded);

I would like to be able to send an email to the administrator when ever someone creates a new account using the Register.aspx page.  This is so that the administrator can add the user to certain membership roles depending on who they are.

I am fine with creating a new extension and adding it to the site, however I'm not sure where I would add the 'raise event' code for a new user being created.