public ActionResult login(usersModel u1) { if (usersrep.chkloginUser(Request["mail"], Request["pass"]) != true) { ModelState.AddModelError(String.Empty, "Invalid email or password"); return(View()); } FormsAuthentication.SetAuthCookie(Request["mail"], false); return(Redirect("Index")); }
public ActionResult login(usersModel u1) { string s1 = Request["mail"].Replace("@gmail.com", ""); if (usersrep.chkloginUser(s1, Request["pass"]) != true) { ModelState.AddModelError(String.Empty, "Invalid email or password"); return(View()); } string s2 = Request["mail"].Replace("@gmail.com", ""); FormsAuthentication.SetAuthCookie(s2, false); return(Redirect("Index")); }