Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Clark 53 posts 250 karma points
    Feb 18, 2014 @ 14:46
    Darren Clark
    0

    Override Saving BackOffice User!

    Hi ,

    Is there anyway to attach to the saving event just after a back office user is created.So i can email the new user the login details.

    Is this possible using umbraco events?

     

    Regards

    Darren

     

  • Darren Clark 53 posts 250 karma points
    Mar 25, 2014 @ 17:35
    Darren Clark
    100

    For anyone wanting to attach to these events then use the following

     public class OverrideUserCreate : ApplicationEventHandler
    {
        public OverrideUserCreate()
        {
            umbraco.BusinessLogic.User.New += User_New;
            umbraco.BusinessLogic.User.Saving += User_Saving;
        }
    
        void User_Saving(umbraco.BusinessLogic.User sender, EventArgs e)
        {
            //your code here
        }
    
        void User_New(umbraco.BusinessLogic.User sender, EventArgs e)
        {
            //your code here
        }
    }
    

    Although you cannot send the user an unencrypted password from here as it is already hashed before the events fire. In the end i had to create my own user control which i added to the user dashboard section to list current users and manage password resetting and email sending from there.

Please Sign in or register to post replies

Write your reply to:

Draft