Deleting user programatically

Hi

I am implementing custom registration where, I need to roll back the entire user registration if any of my custom activity throws error. My questions is how do I programatically roll back user registration in ExCM?

I have OnRegistered event handler from which I am doing 4 custom steps. Any of these custom step can throw error in which case I want to delete the user registration with ExCM.

Thanks
Hemal 

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Matthew McBride

    You can remove a user with the following command...

    Membership.MembershipProvider.DeleteUser(UserName);

    Jeremy Luerkens
    Manager, Software Production
    SharePoint Solutions
Please sign in to leave a comment.