Property | Type | Description | |
---|---|---|---|
CheckPassword | bool | ||
EncodePassword | string | ||
GeneratePassword | string | ||
GenerateSalt | string | ||
GetConfigValue | string | ||
GetUserFromMember | System.Web.Security.MembershipUser | ||
HexToByte | byte[] | ||
ResetAuthenticationFailures | void | ||
UnEncodePassword | string |
Method | Description | |
---|---|---|
ChangePassword ( string username, string oldPassword, string newPassword ) : bool |
Change the current password for a new one. Note: Both are required.
|
|
ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool |
Change the password retreival/reset question and answer pair
|
|
CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser |
Creates a new user with a given set of default values
|
|
DeleteUser ( string username, bool deleteAllRelatedData ) : bool |
Permanently deletes a user from the database
|
|
FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection |
Finds a list of users with a matching email address
|
|
FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection |
Gets a list of users with a matching username
|
|
GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection |
Gets all the users in the database
|
|
GetNumberOfUsersOnline ( ) : int |
Gets the total number of users that are currently online.
|
|
GetPassword ( string username, string answer ) : string |
Gets the current password of a user (provided it isn't hashed)
|
|
GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser |
Gets a MembershipUser object with a given key
|
|
GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser |
Gets a MembershipUser object with a given username
|
|
GetUserNameByEmail ( string email ) : string |
Gets the username by a given matching email address
|
|
Initialize ( string name, System config ) : void | ||
ResetPassword ( string username, string answer ) : string |
Resets the passwords with a generated value
|
|
UnlockUser ( string userName ) : bool |
Unlocks a user (after too many login attempts perhaps)
|
|
UpdateUser ( System.Web.Security.MembershipUser user ) : void |
Updates an existing user with new settings
|
|
ValidateUser ( string username, string password ) : bool |
Authenticates a user with the given username and password
|
Method | Description | |
---|---|---|
CheckPassword ( string password, string dbpassword, string dbsalt ) : bool |
Compares a given password with one stored in the database and an optional salt
|
|
EncodePassword ( string password ) : string |
Encodes a given password using the default MembershipPasswordFormat setting
|
|
GeneratePassword ( int passLength ) : string |
Generates a random password of given length (MinRequiredPasswordLength)
|
|
GenerateSalt ( ) : string |
Salt generation helper (this is essentially the same as the one in SqlMembershipProviders
|
|
GetConfigValue ( string configValue, string defaultValue ) : string |
Used in the initializtion, key in web.config or the default setting if null.
|
|
GetUserFromMember ( |
Converts a Member object into a MembershipUser object using its assigned settings
|
|
HexToByte ( string hexString ) : byte[] |
Converts a string into a byte array
|
|
ResetAuthenticationFailures ( |
Upon a successful login or password reset, this changes all the previous failure markers to defaults.
|
|
UnEncodePassword ( string encodedPassword ) : string |
Decodes a given stored password into a cleartype or unencrypted form. Provided it isn't hashed.
|
public ChangePassword ( string username, string oldPassword, string newPassword ) : bool | ||
username | string | Username the password is being changed for |
oldPassword | string | Old password to verify owner |
newPassword | string | New password |
return | bool |
public ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool | ||
username | string | Username the question and answer are being changed for |
password | string | Current password |
newPasswordQuestion | string | New password question |
newPasswordAnswer | string | New password answer (will also be encrypted) |
return | bool |
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser | ||
username | string | |
password | string | |
string | ||
passwordQuestion | string | |
passwordAnswer | string | |
isApproved | bool | |
providerUserKey | object | |
status | MembershipCreateStatus | |
return | System.Web.Security.MembershipUser |
public DeleteUser ( string username, bool deleteAllRelatedData ) : bool | ||
username | string | Username to delete |
deleteAllRelatedData | bool | Should or shouldn't delete related user data |
return | bool |
public FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection | ||
emailToMatch | string | Given email to search |
pageIndex | int | Current page index |
pageSize | int | Number of results per page |
totalRecords | int | Total number of users returned |
return | System.Web.Security.MembershipUserCollection |
public FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection | ||
usernameToMatch | string | Username to search for |
pageIndex | int | Current page index |
pageSize | int | Number of results per page |
totalRecords | int | Total number of users returned |
return | System.Web.Security.MembershipUserCollection |
public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection | ||
pageIndex | int | Current page index |
pageSize | int | Number of results per page |
totalRecords | int | Total number of users returned |
return | System.Web.Security.MembershipUserCollection |
public GetPassword ( string username, string answer ) : string | ||
username | string | User the password is being retrieved for |
answer | string | Password retrieval answer |
return | string |
public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser | ||
providerUserKey | object | |
userIsOnline | bool | |
return | System.Web.Security.MembershipUser |
public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser | ||
username | string | |
userIsOnline | bool | |
return | System.Web.Security.MembershipUser |
public GetUserNameByEmail ( string email ) : string | ||
string | ||
return | string |
public Initialize ( string name, System config ) : void | ||
name | string | |
config | System | |
return | void |
public ResetPassword ( string username, string answer ) : string | ||
username | string | User the password is being reset for |
answer | string | Password retrieval answer |
return | string |
public UnlockUser ( string userName ) : bool | ||
userName | string | Username to unlock |
return | bool |
public UpdateUser ( System.Web.Security.MembershipUser user ) : void | ||
user | System.Web.Security.MembershipUser | MembershipUser object to modify |
return | void |
public ValidateUser ( string username, string password ) : bool | ||
username | string | Login password |
password | string | The login username |
return | bool |