SimpleMembershipProvider Class

Definition

Provides support for website membership tasks, such as creating accounts, deleting accounts, and managing passwords.

public class SimpleMembershipProvider : WebMatrix.WebData.ExtendedMembershipProvider
type SimpleMembershipProvider = class
    inherit ExtendedMembershipProvider
Public Class SimpleMembershipProvider
Inherits ExtendedMembershipProvider
Inheritance

Constructors

SimpleMembershipProvider()

Initializes a new instance of the SimpleMembershipProvider class.

SimpleMembershipProvider(MembershipProvider)

Initializes a new instance of the SimpleMembershipProvider class by using the specified membership provider.

Properties

ApplicationName

Gets or sets the name of the application.

CasingBehavior

Gets or sets the SimpleMembershipProviderCasingBehavior for this provider.

EnablePasswordReset

Gets a value that indicates whether the membership provider lets users reset their passwords.

EnablePasswordRetrieval

Gets a value that indicates whether the membership provider lets users retrieve their passwords.

MaxInvalidPasswordAttempts

Gets the number of invalid password or password-answer attempts that are allowed before the membership user is locked out.

MinRequiredNonAlphanumericCharacters

Gets the minimum number of special (non-alphanumeric) characters that a password must contain.

MinRequiredPasswordLength

Gets the minimum length that is required for a password.

PasswordAttemptWindow

Gets the number of minutes during which the maximum number of invalid password or security-question answer attempts are allowed before the user account is locked out.

PasswordFormat

Gets a value that indicates the format for storing passwords.

PasswordStrengthRegularExpression

Gets the regular expression that is used to evaluate password complexity.

RequiresQuestionAndAnswer

Gets a value that indicates whether the membership provider requires that the user answer a security question for password reset and retrieval.

RequiresUniqueEmail

Gets a value that indicates whether the membership provider requires a unique email address for each user name.

UserIdColumn

Gets or sets the name of the database column that contains user IDs.

UserNameColumn

Gets or sets the name of the database column that contains user names.

UserTableName

Gets or sets the name of the database table that contains user information.

Methods

ChangePassword(String, String, String)

Changes the password for the specified membership account.

ChangePasswordQuestionAndAnswer(String, String, String, String)

Changes the password question and answer for the specified account.

ConfirmAccount(String)

Activates a pending membership account.

ConfirmAccount(String, String)

Indicates whether the user account is confirmed.

CreateAccount(String, String)

Creates a new user account using the specified user name and password.

(Inherited from ExtendedMembershipProvider)
CreateAccount(String, String, Boolean)

Creates a new user account by using the specified user name and password.

CreateOrUpdateOAuthAccount(String, String, String)

Creates a new OAuth membership account, or updates an existing OAuth Membership account.

CreateUser(String, String, String, String, String, Boolean, Object, MembershipCreateStatus)

Adds the specified user to the membership database.

CreateUserAndAccount(String, String)

Creates a new user profile and a new membership account.

(Inherited from ExtendedMembershipProvider)
CreateUserAndAccount(String, String, Boolean)

Creates a new user profile and a new membership account.

(Inherited from ExtendedMembershipProvider)
CreateUserAndAccount(String, String, Boolean, IDictionary<String,Object>)

Creates a new user profile and a new membership account.

CreateUserAndAccount(String, String, IDictionary<String,Object>)

When overridden in a derived class, creates a new user profile and a new membership account.

(Inherited from ExtendedMembershipProvider)
DeleteAccount(String)

Deletes the specified membership account.

DeleteOAuthAccount(String, String)

Deletes the OAuth or OpenID account with the specified provider name and provider user ID.

DeleteOAuthToken(String)

Deletes the specified OAuth token.

DeleteUser(String, Boolean)

Deletes the specified user account, and optionally deletes all profile data that is related to that user account.

FindUsersByEmail(String, Int32, Int32, Int32)

Returns all of the user accounts whose email address matches the specified email address.

FindUsersByName(String, Int32, Int32, Int32)

Returns all of the user accounts whose name matches the specified user name.

GeneratePasswordResetToken(String)

Generates a password reset token that can be sent to a user in email.

(Inherited from ExtendedMembershipProvider)
GeneratePasswordResetToken(String, Int32)

Generates a password reset token that can be sent to a user in email.

GetAccountsForUser(String)

Returns all OAuth membership accounts that are associated with the specified user name.

GetAllUsers(Int32, Int32, Int32)

Returns all of the user accounts in the data source.

GetCreateDate(String)

Returns the date and time when the specified user account was created.

GetLastPasswordFailureDate(String)

Returns the date and time when an incorrect password was most recently entered for the specified user account.

GetNumberOfUsersOnline()

Returns the number of users who are currently accessing the application.

GetOAuthTokenSecret(String)

Returns the OAuth token secret.

GetPassword(String, String)

Returns the password for the specified user account from the data source.

GetPasswordChangedDate(String)

Returns the date and time when the password was most recently changed for the specified membership account.

GetPasswordFailuresSinceLastSuccess(String)

Returns the number of times that the password for the specified user account was incorrectly entered since the most recent successful login or since the user account was created.

GetUser(Object, Boolean)

Returns information about the user account using the specified user ID, and optionally updates the timestamp of the most recent activity for the user account.

GetUser(String, Boolean)

Returns information about the user account using the specified user name, and optionally updates the timestamp of the most recent activity for the user account.

GetUserId(String)

Returns the ID for a user based on the specified user name.

GetUserIdFromOAuth(String, String)

Returns the user ID for the specified OAuth or OpenID provider and provider user ID.

GetUserIdFromPasswordResetToken(String)

Returns the ID for a user based on a password reset token.

GetUserNameByEmail(String)

Returns the user name that is associated with the specified email address.

GetUserNameFromId(Int32)

Returns the user name that is associated with the specified user ID.

HasLocalAccount(Int32)

Indicates whether the user has local account.

Initialize(String, NameValueCollection)

Initializes the provider.

IsConfirmed(String)

Returns a value that indicates whether the user account has been confirmed by the provider.

ReplaceOAuthRequestTokenWithAccessToken(String, String, String)

Replaces OAuth request token with access token.

ResetPassword(String, String)

Resets the password for a user account to a new, automatically generated password.

ResetPasswordWithToken(String, String)

Resets a password after verifying that the specified password reset token is valid.

StoreOAuthRequestToken(String, String)

Stores an OAuth request token.

UnlockUser(String)

Unlocks a user account so that the membership user can be validated.

UpdateUser(MembershipUser)

Updates user information.

ValidateUser(String, String)

Verifies that the specified user account and password exist.

Applies to