public ActionResult Login(LoginModel model, string returnUrl) { if (ModelState.IsValid) { // Attempt to register the user var user = Service.CheckAuthentication(model.UserName, model.Password, CfHelper.GetRealIp(Request)); if (user == null) { ModelState.AddModelError("", "Username or password doesn't match"); //TempData.SetErrorMessage("Username or password doesn't match"); } else { TempData.SetSuccessMessage(string.Format(ViewRes.User.LoginStrings.Welcome, user.Name)); FormsAuthentication.SetAuthCookie(model.UserName, model.KeepLoggedIn); var redirectUrl = FormsAuthentication.GetRedirectUrl(model.UserName, true); if (redirectUrl != null) { return(Redirect(redirectUrl)); } else { return(RedirectToAction("Index", "Home")); } } } return(View(model)); }
public void CreateReport(int artistId, ArtistReportType reportType, string notes) { Service.CreateReport(artistId, reportType, CfHelper.GetRealIp(Request), notes ?? string.Empty); }
public void CreateReport(int songId, SongReportType reportType, string notes) { Service.CreateReport(songId, reportType, CfHelper.GetRealIp(Request), notes ?? string.Empty); }