Class CustomerSqlMembershipProvider
Extended Sql Membership provider that allows dynamically changing the current application name instead of using static.
Inheritance
Namespace: Mediachase.Commerce.Customers.Profile.Providers
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public class CustomerSqlMembershipProvider : SqlMembershipProvider
Constructors
CustomerSqlMembershipProvider()
Declaration
public CustomerSqlMembershipProvider()
Properties
ApplicationName
Gets or sets the name of the application to store and retrieve membership information for.
Declaration
public override string ApplicationName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | An attempt was made to set the System.Web.Security.SqlMembershipProvider.ApplicationName property to an empty string or null. |
System.Configuration.Provider.ProviderException | An attempt was made to set the System.Web.Security.SqlMembershipProvider.ApplicationName property to a string that is longer than 256 characters. |
Methods
CreateUser(String, String, String, String, String, Boolean, Object, out MembershipCreateStatus)
Adds a new user to the SQL Server membership database.
Declaration
public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The user name for the new user. |
System.String | password | The password for the new user. |
System.String | The e-mail address for the new user. |
|
System.String | passwordQuestion | The password question for the new user. |
System.String | passwordAnswer | The password answer for the new user. |
System.Boolean | isApproved | Whether or not the new user is approved to be validated. |
System.Object | providerUserKey | A System.Guid that uniquely identifies the membership user in the SQL Server database. |
System.Web.Security.MembershipCreateStatus | status | One of the System.Web.Security.MembershipCreateStatus values, indicating whether the user was created successfully. |
Returns
Type | Description |
---|---|
System.Web.Security.MembershipUser | A System.Web.Security.MembershipUser object for the newly created user. If no user was created, this method returns null. |