public ActionResult LogOn() { AccountLogOnFormView accountLogonFormView = new AccountLogOnFormView(); accountLogonFormView.account_information_view = new AccountInformationView() {player_is_logged_in = false}; return View(accountLogonFormView); }
public ActionResult LogOn(AccountLogOnFormView accountLogonFormView) { accountLogonFormView.account_information_view = new AccountInformationView() { player_is_logged_in = false }; User user = _authentication_service.Login(accountLogonFormView.email, accountLogonFormView.password); if (user.IsAuthenticated) { _forms_authentication.SetAuthorisationToken(user.AuthenticationToken); return RedirectToAction("Index", "AccountHome"); } else { //AccountView accountView = InitializeAccountViewWithIssue(true, "Sorry we could not log you in. Please try again."); //accountView.CallBackSettings.ReturnUrl = // GetReturnActionFrom(returnUrl).ToString(); return View(accountLogonFormView); } }