public ActionResult SubmitJoinGroup(JoinGroupEditModel model) { if (!ModelState.IsValid) { return(PartialView("_JoinGroupEntry", model)); } //We need to pass the correct password - if the user does that.Add them to the group, and load the group homepage. try { var liu = _httpContextAccessor.HttpContext.User; var u = _secretSantaBl.CustomUserModelByLoggedInUser(liu); model.CustomUser = u; var m = _secretSantaBl.CheckPasswordInput(model); return(PartialView("_JoinGroupEntry", m)); } catch (AppException ax) { ModelState.AddModelError("", ax.AppMessage); } catch (Exception ex) { ModelState.AddModelError("", ex.Message); _log.LogWarning(ex.Message); } return(PartialView("_JoinGroupEntry", model)); }