C# Класс BlogEngine.Core.Providers.XmlMembershipProvider

Наследование: System.Web.Security.MembershipProvider
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
CheckPassword bool
ReadMembershipDataStore void

Открытые методы

Метод Описание
ChangePassword ( string username, string oldPassword, string newPassword ) : bool

Processes a request to update the password for a membership user.

ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool

Processes a request to update the password question and answer for a membership user.

CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool approved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser

Creates the user.

DeleteUser ( string username, bool deleteAllRelatedData ) : bool

Removes a user from the membership data source.

FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection

Gets a collection of membership users where the e-mail address contains the specified e-mail address to match.

FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection

Gets a collection of membership users where the user name contains the specified user name to match.

GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection

Retrieves a collection of all the users. This implementation ignores pageIndex and pageSize, and it doesn't sort the MembershipUser objects returned.

GetNumberOfUsersOnline ( ) : int

The get number of users online.

GetPassword ( string username ) : string

Gets the password for the user with the given username.

GetPassword ( string username, string answer ) : string

Gets the password for the specified user name from the data source.

GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser

Get a user based on the username parameter. the userIsOnline parameter is ignored.

GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser

Retrieves a user based on his/hers username. the userIsOnline parameter is ignored.

GetUserNameByEmail ( string email ) : string

Retrieves a username based on a matching email.

Initialize ( string name, NameValueCollection config ) : void

Initializes the provider.

ResetPassword ( string username, string answer ) : string

Resets a user's password to a new, automatically generated password.

UnlockUser ( string userName ) : bool

Clears a lock so that the membership user can be validated.

UpdateUser ( System.Web.Security.MembershipUser user ) : void

Updates a user. The username will not be changed.

ValidateUser ( string username, string password ) : bool

Returns true if the username and password match an exsisting user.

Приватные методы

Метод Описание
CheckPassword ( string storedPassword, string inputPassword ) : bool

The check password.

ReadMembershipDataStore ( ) : void

Builds the internal cache of users.

Описание методов

ChangePassword() публичный Метод

Processes a request to update the password for a membership user.
public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string The user to update the password for.
oldPassword string The current password for the specified user.
newPassword string The new password for the specified user.
Результат bool

ChangePasswordQuestionAndAnswer() публичный Метод

Processes a request to update the password question and answer for a membership user.
public ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
username string The user to change the password question and answer for.
password string The password for the specified user.
newPasswordQuestion string The new password question for the specified user.
newPasswordAnswer string The new password answer for the specified user.
Результат bool

CreateUser() публичный Метод

Creates the user.
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool approved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser
username string The username.
password string The password.
email string The email.
passwordQuestion string The password question.
passwordAnswer string The password answer.
approved bool if set to true [approved].
providerUserKey object The provider user key.
status MembershipCreateStatus The status.
Результат System.Web.Security.MembershipUser

DeleteUser() публичный Метод

Removes a user from the membership data source.
public DeleteUser ( string username, bool deleteAllRelatedData ) : bool
username string The name of the user to delete.
deleteAllRelatedData bool true to delete data related to the user from the database; false to leave data related to the user in the database.
Результат bool

FindUsersByEmail() публичный Метод

Gets a collection of membership users where the e-mail address contains the specified e-mail address to match.
public FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
emailToMatch string The e-mail address to search for.
pageIndex int The index of the page of results to return. is zero-based.
pageSize int The size of the page of results to return.
totalRecords int The total number of matched users.
Результат System.Web.Security.MembershipUserCollection

FindUsersByName() публичный Метод

Gets a collection of membership users where the user name contains the specified user name to match.
public FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
usernameToMatch string The user name to search for.
pageIndex int The index of the page of results to return. is zero-based.
pageSize int The size of the page of results to return.
totalRecords int The total number of matched users.
Результат System.Web.Security.MembershipUserCollection

GetAllUsers() публичный Метод

Retrieves a collection of all the users. This implementation ignores pageIndex and pageSize, and it doesn't sort the MembershipUser objects returned.
public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
pageIndex int The page Index.
pageSize int The page Size.
totalRecords int The total Records.
Результат System.Web.Security.MembershipUserCollection

GetNumberOfUsersOnline() публичный Метод

The get number of users online.
public GetNumberOfUsersOnline ( ) : int
Результат int

GetPassword() публичный Метод

Gets the password for the user with the given username.
public GetPassword ( string username ) : string
username string /// the given username ///
Результат string

GetPassword() публичный Метод

Gets the password for the specified user name from the data source.
public GetPassword ( string username, string answer ) : string
username string /// The user to retrieve the password for. ///
answer string /// The password answer for the user. ///
Результат string

GetUser() публичный Метод

Get a user based on the username parameter. the userIsOnline parameter is ignored.
public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
providerUserKey object /// The provider User Key. ///
userIsOnline bool /// The user Is Online. ///
Результат System.Web.Security.MembershipUser

GetUser() публичный Метод

Retrieves a user based on his/hers username. the userIsOnline parameter is ignored.
public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
username string /// The username. ///
userIsOnline bool /// The user Is Online. ///
Результат System.Web.Security.MembershipUser

GetUserNameByEmail() публичный Метод

Retrieves a username based on a matching email.
public GetUserNameByEmail ( string email ) : string
email string /// The email. ///
Результат string

Initialize() публичный Метод

Initializes the provider.
/// The name of the provider is null. /// /// The name of the provider has a length of zero. /// /// An attempt is made to call on a provider after the provider has already been initialized. ///
public Initialize ( string name, NameValueCollection config ) : void
name string The friendly name of the provider.
config System.Collections.Specialized.NameValueCollection A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.
Результат void

ResetPassword() публичный Метод

Resets a user's password to a new, automatically generated password.
public ResetPassword ( string username, string answer ) : string
username string The user to reset the password for.
answer string The password answer for the specified user.
Результат string

UnlockUser() публичный Метод

Clears a lock so that the membership user can be validated.
public UnlockUser ( string userName ) : bool
userName string The membership user whose lock status you want to clear.
Результат bool

UpdateUser() публичный Метод

Updates a user. The username will not be changed.
public UpdateUser ( System.Web.Security.MembershipUser user ) : void
user System.Web.Security.MembershipUser /// The membership user. ///
Результат void

ValidateUser() публичный Метод

Returns true if the username and password match an exsisting user.
public ValidateUser ( string username, string password ) : bool
username string /// The username. ///
password string /// The password. ///
Результат bool