November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Sviatlana,
DefaultMembershipProvider doesn't have deleted user event, but you can create your own membership provider.
I'll use AlloyTech as a sample project, and extend SqlServerMembershipProvider:
1. Inside Business folder, create CustomMembershipProvider:
using System.Web.Providers; namespace AlloyTech.Business { public class CustomMembershipProvider : DefaultMembershipProvider { public override bool DeleteUser(string username, bool deleteAllRelatedData) { // TODO: cleanup code return base.DeleteUser(username, deleteAllRelatedData); } } }
2. In web.config, register a new membership provider and set it as default one:
<membership defaultProvider="CustomMembershipProvider" userIsOnlineTimeWindow="10" hashAlgorithmType="HMACSHA512"> <providers> <clear /> <add name="CustomMembershipProvider" type="AlloyTech.Business.CustomMembershipProvider, AlloyTech" connectionStringName="EPiServerDB" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/> ... </providers> </membership>
3. In admin mode, if you get an exception when you try to create / delete user, just restart the IIS (or kill IIS Express Worker process from task manager)
That's it. Hope it helps :)
Hi!
Is there any possibility to delete automatically CustomerContact if MemberShip User is deleted in the Cms via Admin interface?
Is there possibility to subscribe to the MemberShip User delete?