Try our conversational search powered by Generative AI!

Unique email

Vote:
 

Hi!

Is it possible to make the email field for an episerver user unique, to avoid users with duplicate emails? Or do we have to create custom logic around this?

This question applies both to aspnet membership provider and aspnet identity.

#208116
Oct 14, 2019 15:42
Vote:
 

In Episervers aspnet identity implementation the RequireUniqueEmail is set to true as standard so if you haven't done any custom implementation of the ApplicationUserManager this should be the default behaviour.

For memebership provider this is set on the provider declaration in web.config

<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">  
  <providers>  
    <add name="SqlProvider"  
      type="System.Web.Security.SqlMembershipProvider"  
      connectionStringName="SqlServices"  
      enablePasswordRetrieval="false"  
      enablePasswordReset="true"  
      requiresQuestionAndAnswer="true"  
      passwordFormat="Hashed"  
      requiresUniqueEmail="true"  
      applicationName="MyApplication" />  
  </providers>  
</membership>  
#208655
Oct 29, 2019 16:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.