C# Class JordanRift.Grassroots.Web.Controllers.AccountController

Inheritance: GrassrootsControllerBase
Show file Open project: JordanRift/Grassroots Class Usage Examples

Public Methods

Method Description
AccountController ( IUserProfileRepository userProfileRepository, IAccountMailer accountMailer, ICampaignDonorRepository campaignDonorRepository ) : System
Activate ( string hash, string redirect = "" ) : System.Web.Mvc.RedirectToRouteResult

Check if activation hash is valid. * If yes, set user profile IsActivated to true and redirect to login * If no, redirect to AwaitingActivation

AwaitingActivation ( ) : System.Web.Mvc.ActionResult
CalculateSleepSeconds ( int failedLogins, int maxPasswordAttempts ) : int
ChangePasswordSuccess ( ) : System.Web.Mvc.ActionResult
ForgotPassword ( ) : System.Web.Mvc.ActionResult
LogOff ( ) : System.Web.Mvc.ActionResult
LogOn ( string returnUrl = "" ) : System.Web.Mvc.ActionResult
Register ( string returnUrl = "" ) : System.Web.Mvc.ActionResult
UpdatePassword ( string hash ) : System.Web.Mvc.ActionResult

Protected Methods

Method Description
Initialize ( System.Web.Routing.RequestContext requestContext ) : void

Private Methods

Method Description
AuthenticateUser ( LogOnModel model, string returnUrl = "" ) : System.Web.Mvc.ActionResult
ChangePassword ( string returnUrl = "" ) : System.Web.Mvc.ActionResult
MapAuthorizeModel ( UserProfile userProfile, Organization organization, string returnUrl = "" ) : AuthorizeModel
MapPasswordReset ( UserProfile userProfile ) : PasswordResetModel
MapWelcomeModel ( UserProfile userProfile, Organization organization ) : WelcomeModel
PasswordChangeFailed ( ChangePasswordModel model ) : System.Web.Mvc.ActionResult
RegisterUser ( RegisterModel model, string returnUrl = "" ) : System.Web.Mvc.ActionResult
SavePassword ( ChangePasswordModel model, string returnUrl = "" ) : System.Web.Mvc.ActionResult
SendAuthorizationNote ( AuthorizeModel model ) : System.Web.Mvc.ActionResult
SendPasswordReset ( ForgotPasswordModel model ) : System.Web.Mvc.ActionResult
UpdateForgottenPassword ( string hash, UpdatePasswordModel model ) : System.Web.Mvc.ActionResult
ValidateLogon ( UserProfile userProfile, LogOnModel model, string url, int &failedLogins, bool &mustResetPassword ) : System.Web.Mvc.ActionResult

Method Details

AccountController() public method

public AccountController ( IUserProfileRepository userProfileRepository, IAccountMailer accountMailer, ICampaignDonorRepository campaignDonorRepository ) : System
userProfileRepository IUserProfileRepository
accountMailer IAccountMailer
campaignDonorRepository ICampaignDonorRepository
return System

Activate() public method

Check if activation hash is valid. * If yes, set user profile IsActivated to true and redirect to login * If no, redirect to AwaitingActivation
public Activate ( string hash, string redirect = "" ) : System.Web.Mvc.RedirectToRouteResult
hash string ashed string to compare
redirect string
return System.Web.Mvc.RedirectToRouteResult

AwaitingActivation() public method

public AwaitingActivation ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

CalculateSleepSeconds() public method

public CalculateSleepSeconds ( int failedLogins, int maxPasswordAttempts ) : int
failedLogins int
maxPasswordAttempts int
return int

ChangePasswordSuccess() public method

public ChangePasswordSuccess ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

ForgotPassword() public method

public ForgotPassword ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

Initialize() protected method

protected Initialize ( System.Web.Routing.RequestContext requestContext ) : void
requestContext System.Web.Routing.RequestContext
return void

LogOff() public method

public LogOff ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

LogOn() public method

public LogOn ( string returnUrl = "" ) : System.Web.Mvc.ActionResult
returnUrl string
return System.Web.Mvc.ActionResult

Register() public method

public Register ( string returnUrl = "" ) : System.Web.Mvc.ActionResult
returnUrl string
return System.Web.Mvc.ActionResult

UpdatePassword() public method

public UpdatePassword ( string hash ) : System.Web.Mvc.ActionResult
hash string
return System.Web.Mvc.ActionResult