Class MySqlSimpleMembershipProvider
Manages storage of simple membership information for an ASP.NET application in a MySQL database.
Inheritance
System.Object
MySqlSimpleMembershipProvider
Assembly: MySql.Web.dll
Version: 9.1.0
Syntax
public class MySqlSimpleMembershipProvider : ExtendedMembershipProvider
Constructors
MySqlSimpleMembershipProvider()
Declaration
public MySqlSimpleMembershipProvider()
MySqlSimpleMembershipProvider(MembershipProvider)
Declaration
public MySqlSimpleMembershipProvider(MembershipProvider previousProvider)
Parameters
Type |
Name |
Description |
System.Web.Security.MembershipProvider |
previousProvider |
|
Properties
ApplicationName
Declaration
public override string ApplicationName { get; set; }
Property Value
Type |
Description |
System.String |
|
ConnectionString
Gets or sets the connection string.
Declaration
public string ConnectionString { get; set; }
Property Value
Type |
Description |
System.String |
|
ConnectionStringName
Gets or sets the name associated to the connection string when stored in the configuration manager.
Declaration
public string ConnectionStringName { get; set; }
Property Value
Type |
Description |
System.String |
|
EnablePasswordReset
Declaration
public override bool EnablePasswordReset { get; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePasswordRetrieval
Declaration
public override bool EnablePasswordRetrieval { get; }
Property Value
Type |
Description |
System.Boolean |
|
MaxInvalidPasswordAttempts
Declaration
public override int MaxInvalidPasswordAttempts { get; }
Property Value
Type |
Description |
System.Int32 |
|
MinRequiredNonAlphanumericCharacters
Declaration
public override int MinRequiredNonAlphanumericCharacters { get; }
Property Value
Type |
Description |
System.Int32 |
|
MinRequiredPasswordLength
Declaration
public override int MinRequiredPasswordLength { get; }
Property Value
Type |
Description |
System.Int32 |
|
PasswordAttemptWindow
Declaration
public override int PasswordAttemptWindow { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public override MembershipPasswordFormat PasswordFormat { get; }
Property Value
Type |
Description |
System.Web.Security.MembershipPasswordFormat |
|
PasswordStrengthRegularExpression
Declaration
public override string PasswordStrengthRegularExpression { get; }
Property Value
Type |
Description |
System.String |
|
ProviderName
Gets or sets the name of this provider.
Declaration
public string ProviderName { get; set; }
Property Value
Type |
Description |
System.String |
|
RequiresQuestionAndAnswer
Declaration
public override bool RequiresQuestionAndAnswer { get; }
Property Value
Type |
Description |
System.Boolean |
|
RequiresUniqueEmail
Declaration
public override bool RequiresUniqueEmail { get; }
Property Value
Type |
Description |
System.Boolean |
|
UserIdColumn
Gets the name of the column storing the user ids.
Declaration
public string UserIdColumn { get; }
Property Value
Type |
Description |
System.String |
|
UserNameColumn
Gets the name of the column storing the user names.
Declaration
public string UserNameColumn { get; }
Property Value
Type |
Description |
System.String |
|
UserTableName
Gets the name of the table storing user information.
Declaration
public string UserTableName { get; }
Property Value
Type |
Description |
System.String |
|
Methods
ChangePassword(String, String, String)
Declaration
public override bool ChangePassword(string username, string oldPassword, string newPassword)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
oldPassword |
|
System.String |
newPassword |
|
Returns
Type |
Description |
System.Boolean |
|
ChangePasswordQuestionAndAnswer(String, String, String, String)
Declaration
public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
password |
|
System.String |
newPasswordQuestion |
|
System.String |
newPasswordAnswer |
|
Returns
Type |
Description |
System.Boolean |
|
ConfirmAccount(String)
Declaration
public override bool ConfirmAccount(string accountConfirmationToken)
Parameters
Type |
Name |
Description |
System.String |
accountConfirmationToken |
|
Returns
Type |
Description |
System.Boolean |
|
ConfirmAccount(String, String)
Declaration
public override bool ConfirmAccount(string userName, string accountConfirmationToken)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.String |
accountConfirmationToken |
|
Returns
Type |
Description |
System.Boolean |
|
CreateAccount(String, String, Boolean)
Declaration
public override string CreateAccount(string userName, string password, bool requireConfirmationToken)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.String |
password |
|
System.Boolean |
requireConfirmationToken |
|
Returns
Type |
Description |
System.String |
|
CreateOrUpdateOAuthAccount(String, String, String)
Declaration
public override void CreateOrUpdateOAuthAccount(string provider, string providerUserId, string userName)
Parameters
Type |
Name |
Description |
System.String |
provider |
|
System.String |
providerUserId |
|
System.String |
userName |
|
CreateUser(String, String, String, String, String, Boolean, Object, out MembershipCreateStatus)
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 |
|
System.String |
password |
|
System.String |
email |
|
System.String |
passwordQuestion |
|
System.String |
passwordAnswer |
|
System.Boolean |
isApproved |
|
System.Object |
providerUserKey |
|
System.Web.Security.MembershipCreateStatus |
status |
|
Returns
Type |
Description |
System.Web.Security.MembershipUser |
|
CreateUserAndAccount(String, String, Boolean, IDictionary<String, Object>)
Declaration
public override string CreateUserAndAccount(string userName, string password, bool requireConfirmation, IDictionary<string, object> values)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.String |
password |
|
System.Boolean |
requireConfirmation |
|
System.Collections.Generic.IDictionary<System.String, System.Object> |
values |
|
Returns
Type |
Description |
System.String |
|
DeleteAccount(String)
Declaration
public override bool DeleteAccount(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.Boolean |
|
DeleteOAuthAccount(String, String)
Declaration
public override void DeleteOAuthAccount(string provider, string providerUserId)
Parameters
Type |
Name |
Description |
System.String |
provider |
|
System.String |
providerUserId |
|
DeleteOAuthToken(String)
Declaration
public override void DeleteOAuthToken(string token)
Parameters
Type |
Name |
Description |
System.String |
token |
|
DeleteUser(String, Boolean)
Declaration
public override bool DeleteUser(string username, bool deleteAllRelatedData)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.Boolean |
deleteAllRelatedData |
|
Returns
Type |
Description |
System.Boolean |
|
FindUsersByEmail(String, Int32, Int32, out Int32)
Declaration
public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
Parameters
Type |
Name |
Description |
System.String |
emailToMatch |
|
System.Int32 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int32 |
totalRecords |
|
Returns
Type |
Description |
System.Web.Security.MembershipUserCollection |
|
FindUsersByName(String, Int32, Int32, out Int32)
Declaration
public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
Parameters
Type |
Name |
Description |
System.String |
usernameToMatch |
|
System.Int32 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int32 |
totalRecords |
|
Returns
Type |
Description |
System.Web.Security.MembershipUserCollection |
|
GeneratePasswordResetToken(String, Int32)
Declaration
public override string GeneratePasswordResetToken(string userName, int tokenExpirationInMinutesFromNow)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
System.Int32 |
tokenExpirationInMinutesFromNow |
|
Returns
Type |
Description |
System.String |
|
GetAccountsForUser(String)
Declaration
public override ICollection<OAuthAccountData> GetAccountsForUser(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.Collections.Generic.ICollection<OAuthAccountData> |
|
GetAllUsers(Int32, Int32, out Int32)
Declaration
public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int32 |
totalRecords |
|
Returns
Type |
Description |
System.Web.Security.MembershipUserCollection |
|
GetCreateDate(String)
Declaration
public override DateTime GetCreateDate(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.DateTime |
|
GetLastPasswordFailureDate(String)
Declaration
public override DateTime GetLastPasswordFailureDate(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.DateTime |
|
GetNumberOfUsersOnline()
Declaration
public override int GetNumberOfUsersOnline()
Returns
Type |
Description |
System.Int32 |
|
GetOAuthTokenSecret(String)
Declaration
public override string GetOAuthTokenSecret(string token)
Parameters
Type |
Name |
Description |
System.String |
token |
|
Returns
Type |
Description |
System.String |
|
GetPassword(String, String)
Declaration
public override string GetPassword(string username, string answer)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
answer |
|
Returns
Type |
Description |
System.String |
|
GetPasswordChangedDate(String)
Declaration
public override DateTime GetPasswordChangedDate(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.DateTime |
|
GetPasswordFailuresSinceLastSuccess(String)
Declaration
public override int GetPasswordFailuresSinceLastSuccess(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.Int32 |
|
GetUser(Object, Boolean)
Declaration
public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
Parameters
Type |
Name |
Description |
System.Object |
providerUserKey |
|
System.Boolean |
userIsOnline |
|
Returns
Type |
Description |
System.Web.Security.MembershipUser |
|
GetUser(String, Boolean)
Declaration
public override MembershipUser GetUser(string username, bool userIsOnline)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.Boolean |
userIsOnline |
|
Returns
Type |
Description |
System.Web.Security.MembershipUser |
|
GetUserId(String)
Gets the id of the specified user.
Declaration
public int GetUserId(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
The name of the user.
|
Returns
Type |
Description |
System.Int32 |
An integer representing the id of the user.
|
GetUserIdFromOAuth(String, String)
Declaration
public override int GetUserIdFromOAuth(string provider, string providerUserId)
Parameters
Type |
Name |
Description |
System.String |
provider |
|
System.String |
providerUserId |
|
Returns
Type |
Description |
System.Int32 |
|
GetUserIdFromPasswordResetToken(String)
Declaration
public override int GetUserIdFromPasswordResetToken(string token)
Parameters
Type |
Name |
Description |
System.String |
token |
|
Returns
Type |
Description |
System.Int32 |
|
GetUserNameByEmail(String)
Declaration
public override string GetUserNameByEmail(string email)
Parameters
Type |
Name |
Description |
System.String |
email |
|
Returns
Type |
Description |
System.String |
|
GetUserNameFromId(Int32)
Declaration
public override string GetUserNameFromId(int userId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Returns
Type |
Description |
System.String |
|
HasLocalAccount(Int32)
Declaration
public override bool HasLocalAccount(int userId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Returns
Type |
Description |
System.Boolean |
|
Initialize(String, NameValueCollection)
Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Collections.Specialized.NameValueCollection |
config |
|
IsConfirmed(String)
Declaration
public override bool IsConfirmed(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.Boolean |
|
ReplaceOAuthRequestTokenWithAccessToken(String, String, String)
Declaration
public override void ReplaceOAuthRequestTokenWithAccessToken(string requestToken, string accessToken, string accessTokenSecret)
Parameters
Type |
Name |
Description |
System.String |
requestToken |
|
System.String |
accessToken |
|
System.String |
accessTokenSecret |
|
ResetPassword(String, String)
Declaration
public override string ResetPassword(string username, string answer)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
answer |
|
Returns
Type |
Description |
System.String |
|
ResetPasswordWithToken(String, String)
Declaration
public override bool ResetPasswordWithToken(string token, string newPassword)
Parameters
Type |
Name |
Description |
System.String |
token |
|
System.String |
newPassword |
|
Returns
Type |
Description |
System.Boolean |
|
StoreOAuthRequestToken(String, String)
Declaration
public override void StoreOAuthRequestToken(string requestToken, string requestTokenSecret)
Parameters
Type |
Name |
Description |
System.String |
requestToken |
|
System.String |
requestTokenSecret |
|
UnlockUser(String)
Declaration
public override bool UnlockUser(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
Type |
Description |
System.Boolean |
|
UpdateUser(MembershipUser)
Declaration
public override void UpdateUser(MembershipUser user)
Parameters
Type |
Name |
Description |
System.Web.Security.MembershipUser |
user |
|
ValidateUser(String, String)
Declaration
public override bool ValidateUser(string username, string password)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
password |
|
Returns
Type |
Description |
System.Boolean |
|