BinaryStudio.TaskManager.Web.Content.Controllers.AdminController.RegisterNewUser C# (CSharp) Method

RegisterNewUser() private method

private RegisterNewUser ( RegisterNewUserModel model ) : System.Web.Mvc.ActionResult
model RegisterNewUserModel
return System.Web.Mvc.ActionResult
        public ActionResult RegisterNewUser(RegisterNewUserModel model)
        {
            if (ModelState.IsValid)
            {
                User user = new User()
                                {
                                    Id = model.userId, 
                                    UserName = model.UserName, 
                                    Email = model.Email, 
                                    Password = model.Password,
                                    RoleId = 1
                                };
                userRepository.CreateUser(user);
                
                //FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */);
                //TODO: redirect to view with relation employee with account
                return RedirectToAction("ConnectUserWithEmployee", "Admin");
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }