C# Class JordanRift.Grassroots.Framework.Services.GrassrootsMembershipService

Datei anzeigen Open project: JordanRift/Grassroots Class Usage Examples

Public Methods

Method Description
ChangePassword ( string username, string oldPassword, string newPassword ) : bool
CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status, bool requiresUniqueEmail ) : System.Web.Security.MembershipUser
DeleteUser ( string username ) : bool
FindUsersByName ( string usernameToMatch, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GenerateRandomPin ( ) : string

Generates a secure random number for a user to verify password reset

GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GetNumberOfUsersOnline ( ) : int
GetUser ( string username ) : System.Web.Security.MembershipUser
GetUserAuthorizationHash ( ) : string
GrassrootsMembershipService ( ) : System
HashPassword ( string passwordText, byte saltBytes ) : string
IsActivationHashValid ( UserProfile userProfile ) : bool
ResetPassword ( string username, bool enablePasswordReset ) : string
UnlockUser ( string userName ) : bool
UpdatePassword ( UserProfile userProfile, string activationPin, string password ) : bool
UpdateUser ( System.Web.Security.MembershipUser user ) : void
ValidateUser ( string username, string password, int maxInvalidPasswordAttempts ) : bool
VerifyPasswordHash ( string plainText, string hashedPassword ) : bool

Private Methods

Method Description
MapQuery ( IEnumerable query ) : System.Web.Security.MembershipUserCollection

Method Details

ChangePassword() public method

public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
return bool

CreateUser() public method

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

DeleteUser() public method

public DeleteUser ( string username ) : bool
username string
return bool

FindUsersByName() public method

public FindUsersByName ( string usernameToMatch, int &totalRecords ) : System.Web.Security.MembershipUserCollection
usernameToMatch string
totalRecords int
return System.Web.Security.MembershipUserCollection

GenerateRandomPin() public method

Generates a secure random number for a user to verify password reset
public GenerateRandomPin ( ) : string
return string

GetAllUsers() public method

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

GetNumberOfUsersOnline() public method

public GetNumberOfUsersOnline ( ) : int
return int

GetUser() public method

public GetUser ( string username ) : System.Web.Security.MembershipUser
username string
return System.Web.Security.MembershipUser

GetUserAuthorizationHash() public method

public GetUserAuthorizationHash ( ) : string
return string

GrassrootsMembershipService() public method

public GrassrootsMembershipService ( ) : System
return System

HashPassword() public static method

public static HashPassword ( string passwordText, byte saltBytes ) : string
passwordText string
saltBytes byte
return string

IsActivationHashValid() public method

public IsActivationHashValid ( UserProfile userProfile ) : bool
userProfile UserProfile
return bool

ResetPassword() public method

public ResetPassword ( string username, bool enablePasswordReset ) : string
username string
enablePasswordReset bool
return string

UnlockUser() public method

public UnlockUser ( string userName ) : bool
userName string
return bool

UpdatePassword() public method

public UpdatePassword ( UserProfile userProfile, string activationPin, string password ) : bool
userProfile UserProfile
activationPin string
password string
return bool

UpdateUser() public method

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

ValidateUser() public method

public ValidateUser ( string username, string password, int maxInvalidPasswordAttempts ) : bool
username string
password string
maxInvalidPasswordAttempts int
return bool

VerifyPasswordHash() public static method

public static VerifyPasswordHash ( string plainText, string hashedPassword ) : bool
plainText string
hashedPassword string
return bool