public ActionResult Index(string signin, LocalRegistrationModel model) { if (ModelState.IsValid) { var user = new LocalRegistrationUserService.CustomUser { Username = model.Username, Password = model.Password, Subject = Guid.NewGuid().ToString(), Claims = new List<Claim>() }; LocalRegistrationUserService.Users.Add(user); user.Claims.Add(new Claim(Constants.ClaimTypes.GivenName, model.First)); user.Claims.Add(new Claim(Constants.ClaimTypes.FamilyName, model.Last)); return Redirect("~/core/" + Constants.RoutePaths.Login + "?signin=" + signin); } return View(); }
public ActionResult Index(string signin, LocalRegistrationModel model) { if (ModelState.IsValid) { var user = new LocalRegistrationUserService.CustomUser { Username = model.Username, Password = model.Password, Subject = Guid.NewGuid().ToString(), Claims = new List <Claim>() }; LocalRegistrationUserService.Users.Add(user); user.Claims.Add(new Claim(Constants.ClaimTypes.GivenName, model.First)); user.Claims.Add(new Claim(Constants.ClaimTypes.FamilyName, model.Last)); return(Redirect("~/core/" + Constants.RoutePaths.Login + "?signin=" + signin)); } return(View()); }