public ActionResult Login(LoginVm input) { if (this.ModelState.IsValid) { // validate user if (CurrentMember.validateUser(input.email, input.password)) { memberManager.updateLastLoginForMember(input.email, input.password); FormsAuthentication.RedirectFromLoginPage(input.email, input.rememberMe); } else { ViewBag.uname = input.email; this.ModelState.AddModelError("", "Please check Username and Password, and try again."); } } return(View()); }
public ActionResult Login(MemberVo input) { if (this.ModelState.IsValid) { if (CurrentMember.validateUser(input.username, input.password)) { FormsAuthentication.SetAuthCookie(input.username, true); return(RedirectToAction("Index", "Home")); //FormsAuthentication.RedirectFromLoginPage(input.username, true); } else { ViewBag.uname = input.username; this.ModelState.AddModelError("", "Please check Username and Password, and try again."); } } return(View()); }