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

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

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

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

Change the password if the old password matches what is stored

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

Not implemented

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

Add new user to database

DeleteUser ( string username, bool deleteAllRelatedData ) : bool

Delete user from database

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

Not implemented

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

Not implemented

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

Return all users in MembershipUserCollection

GetNumberOfUsersOnline ( ) : int

Not implemented

GetPassword ( string username, string answer ) : string

Not implemented

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

Gets user information from the data source based on the unique identifier for the membership user. Provides an option to update the last-activity date/time stamp for the user.

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

Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.

GetUserNameByEmail ( string email ) : string

Gets the user name associated with the specified e-mail address.

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

Not implemented

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

Update User Data (not password)

ValidateUser ( string username, string password ) : bool

Check username and password

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

Метод Описание
CreateConnection ( ) : DbConnectionHelper
FormatParamName ( string parameterName ) : string

Returns a formatted parameter name to include this DbBlogProvider instance's paramPrefix.

GetMembershipUser ( string userName, string email, System.DateTime lastLogin ) : System.Web.Security.MembershipUser

Gets membership user.

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

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

Change the password if the old password matches what is stored
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() публичный Метод

Not implemented
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() публичный Метод

Add new user to database
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 user name for the new user.
password string The password for the new user.
email string The e-mail address for the new user.
passwordQuestion string The password question for the new user.
passwordAnswer string The password answer for the new user
approved bool Whether or not the new user is approved to be validated.
providerUserKey object The unique identifier from the membership data source for the user.
status MembershipCreateStatus A enumeration value indicating whether the user was created successfully.
Результат System.Web.Security.MembershipUser

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

Delete user from database
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() публичный Метод

Not implemented
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() публичный Метод

Not implemented
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() публичный Метод

Return all users in MembershipUserCollection
public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
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

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

Not implemented
public GetNumberOfUsersOnline ( ) : int
Результат int

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

Not implemented
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() публичный Метод

Gets user information from the data source based on the unique identifier for the membership user. Provides an option to update the last-activity date/time stamp for the user.
public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
providerUserKey object The unique identifier for the membership user to get information for.
userIsOnline bool true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
Результат System.Web.Security.MembershipUser

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

Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.
public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
username string The name of the user to get information for.
userIsOnline bool true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
Результат System.Web.Security.MembershipUser

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

Gets the user name associated with the specified e-mail address.
public GetUserNameByEmail ( string email ) : string
email string The e-mail address to search for.
Результат string

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

Initializes the provider
public Initialize ( string name, NameValueCollection config ) : void
name string /// Configuration name ///
config System.Collections.Specialized.NameValueCollection /// Configuration settings ///
Результат 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() публичный Метод

Not implemented
public UnlockUser ( string userName ) : bool
userName string The membership user whose lock status you want to clear.
Результат bool

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

Update User Data (not password)
public UpdateUser ( System.Web.Security.MembershipUser user ) : void
user System.Web.Security.MembershipUser A object that represents the user to update and the updated information for the user.
Результат void

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

Check username and password
public ValidateUser ( string username, string password ) : bool
username string The name of the user to validate.
password string The password for the specified user.
Результат bool