views:

29

answers:

1

Hello,

Does the ASP.NET Membership Provider allow you to create a user with no email address?

I plan to still send the username and password.

 <membership defaultProvider="MySqlMembershipProvider">
  <providers>
    <clear />
    <add connectionStringName="SimpleTickConnection" applicationName="TheaterSales" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="15" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="MySqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </providers>
</membership>
+1  A: 

I don't think so. I'm not 100% sure but here's a workaround: you can remove the email field from the createuserwizard (if you're using it to register new users) and assign a custom email for all users by handling the CreatingUser event (say [email protected]).
Also, you should disable RequiresUniqueEmail in your provider (via web.config settings)

Kamyar
This is the obvious resolution to the problem.
Sky Sanders