SimpleMembershipProvider SimpleMembershipProvider 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() SimpleMembershipProvider() SimpleMembershipProvider()

Initializes a new instance of the SimpleMembershipProvider class.

SimpleMembershipProvider(MembershipProvider) SimpleMembershipProvider(MembershipProvider) SimpleMembershipProvider(MembershipProvider)

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

Properties

ApplicationName ApplicationName ApplicationName

Gets or sets the name of the application.

CasingBehavior CasingBehavior CasingBehavior

Gets or sets the SimpleMembershipProviderCasingBehavior for this provider.

EnablePasswordReset EnablePasswordReset EnablePasswordReset

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

EnablePasswordRetrieval EnablePasswordRetrieval EnablePasswordRetrieval

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

MaxInvalidPasswordAttempts MaxInvalidPasswordAttempts MaxInvalidPasswordAttempts

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

MinRequiredNonAlphanumericCharacters MinRequiredNonAlphanumericCharacters MinRequiredNonAlphanumericCharacters

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

MinRequiredPasswordLength MinRequiredPasswordLength MinRequiredPasswordLength

Gets the minimum length that is required for a password.

PasswordAttemptWindow PasswordAttemptWindow 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 PasswordFormat PasswordFormat

Gets a value that indicates the format for storing passwords.

PasswordStrengthRegularExpression PasswordStrengthRegularExpression PasswordStrengthRegularExpression

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

RequiresQuestionAndAnswer RequiresQuestionAndAnswer RequiresQuestionAndAnswer

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

RequiresUniqueEmail RequiresUniqueEmail RequiresUniqueEmail

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

UserIdColumn UserIdColumn UserIdColumn

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

UserNameColumn UserNameColumn UserNameColumn

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

UserTableName UserTableName UserTableName

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

Methods

ChangePassword(String, String, String) ChangePassword(String, String, String) ChangePassword(String, String, String)

Changes the password for the specified membership account.

ChangePasswordQuestionAndAnswer(String, String, String, String) ChangePasswordQuestionAndAnswer(String, String, String, String) ChangePasswordQuestionAndAnswer(String, String, String, String)

Changes the password question and answer for the specified account.

ConfirmAccount(String) ConfirmAccount(String) ConfirmAccount(String)

Activates a pending membership account.

ConfirmAccount(String, String) ConfirmAccount(String, String) ConfirmAccount(String, String)

Indicates whether the user account is confirmed.

CreateAccount(String, String) CreateAccount(String, String) CreateAccount(String, String)

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

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

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

CreateOrUpdateOAuthAccount(String, String, String) CreateOrUpdateOAuthAccount(String, String, String) 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) CreateUser(String, String, String, String, String, Boolean, Object, MembershipCreateStatus) CreateUser(String, String, String, String, String, Boolean, Object, MembershipCreateStatus)

Adds the specified user to the membership database.

CreateUserAndAccount(String, String) CreateUserAndAccount(String, String) CreateUserAndAccount(String, String)

Creates a new user profile and a new membership account.

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

Creates a new user profile and a new membership account.

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

Creates a new user profile and a new membership account.

CreateUserAndAccount(String, String, IDictionary<String,Object>) CreateUserAndAccount(String, String, IDictionary<String,Object>) 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) DeleteAccount(String) DeleteAccount(String)

Deletes the specified membership account.

DeleteOAuthAccount(String, String) DeleteOAuthAccount(String, String) DeleteOAuthAccount(String, String)

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

DeleteOAuthToken(String) DeleteOAuthToken(String) DeleteOAuthToken(String)

Deletes the specified OAuth token.

DeleteUser(String, Boolean) DeleteUser(String, Boolean) 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) FindUsersByEmail(String, Int32, Int32, Int32) FindUsersByEmail(String, Int32, Int32, Int32)

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

FindUsersByName(String, Int32, Int32, Int32) FindUsersByName(String, Int32, Int32, Int32) FindUsersByName(String, Int32, Int32, Int32)

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

GeneratePasswordResetToken(String) GeneratePasswordResetToken(String) GeneratePasswordResetToken(String)

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

(Inherited from ExtendedMembershipProvider)
GeneratePasswordResetToken(String, Int32) GeneratePasswordResetToken(String, Int32) GeneratePasswordResetToken(String, Int32)

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

GetAccountsForUser(String) GetAccountsForUser(String) GetAccountsForUser(String)

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

GetAllUsers(Int32, Int32, Int32) GetAllUsers(Int32, Int32, Int32) GetAllUsers(Int32, Int32, Int32)

Returns all of the user accounts in the data source.

GetCreateDate(String) GetCreateDate(String) GetCreateDate(String)

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

GetLastPasswordFailureDate(String) GetLastPasswordFailureDate(String) GetLastPasswordFailureDate(String)

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

GetNumberOfUsersOnline() GetNumberOfUsersOnline() GetNumberOfUsersOnline()

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

GetOAuthTokenSecret(String) GetOAuthTokenSecret(String) GetOAuthTokenSecret(String)

Returns the OAuth token secret.

GetPassword(String, String) GetPassword(String, String) GetPassword(String, String)

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

GetPasswordChangedDate(String) GetPasswordChangedDate(String) GetPasswordChangedDate(String)

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

GetPasswordFailuresSinceLastSuccess(String) GetPasswordFailuresSinceLastSuccess(String) 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) GetUser(Object, Boolean) 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) GetUser(String, Boolean) 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) GetUserId(String) GetUserId(String)

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

GetUserIdFromOAuth(String, String) GetUserIdFromOAuth(String, String) GetUserIdFromOAuth(String, String)

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

GetUserIdFromPasswordResetToken(String) GetUserIdFromPasswordResetToken(String) GetUserIdFromPasswordResetToken(String)

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

GetUserNameByEmail(String) GetUserNameByEmail(String) GetUserNameByEmail(String)

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

GetUserNameFromId(Int32) GetUserNameFromId(Int32) GetUserNameFromId(Int32)

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

HasLocalAccount(Int32) HasLocalAccount(Int32) HasLocalAccount(Int32)

Indicates whether the user has local account.

Initialize(String, NameValueCollection) Initialize(String, NameValueCollection) Initialize(String, NameValueCollection)

Initializes the provider.

IsConfirmed(String) IsConfirmed(String) IsConfirmed(String)

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

ReplaceOAuthRequestTokenWithAccessToken(String, String, String) ReplaceOAuthRequestTokenWithAccessToken(String, String, String) ReplaceOAuthRequestTokenWithAccessToken(String, String, String)

Replaces OAuth request token with access token.

ResetPassword(String, String) ResetPassword(String, String) ResetPassword(String, String)

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

ResetPasswordWithToken(String, String) ResetPasswordWithToken(String, String) ResetPasswordWithToken(String, String)

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

StoreOAuthRequestToken(String, String) StoreOAuthRequestToken(String, String) StoreOAuthRequestToken(String, String)

Stores an OAuth request token.

UnlockUser(String) UnlockUser(String) UnlockUser(String)

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

UpdateUser(MembershipUser) UpdateUser(MembershipUser) UpdateUser(MembershipUser)

Updates user information.

ValidateUser(String, String) ValidateUser(String, String) ValidateUser(String, String)

Verifies that the specified user account and password exist.

Applies to