Exemple #1
0
        public ActionResult Activate(ActivateModel model)
        {
            if (ModelState.IsValid)
            {
                if (Manager.ActivateNewUser(model.IdUser, model.Code))
                {
                    var user = Manager.GetUserById(model.IdUser);

                    AccountHelper.Logout();

                    LogInUser(user);

                    return PartialView("Partial/_activateSuccessPartial");
                }
                else
                {
                    ModelState.AddModelError("Code", "Kod jest nieprawidłowy");
                }
            }

            return PartialView("Partial/_activatePartial", model);
        }
Exemple #2
0
 public PartialViewResult Activate(int userId)
 {
     var model = new ActivateModel();
     model.IdUser = userId;
     return PartialView("Activate", model);
 }
Exemple #3
0
 public PartialViewResult RememberPassConfirm(int userId)
 {
     var model = new ActivateModel();
     model.IdUser = userId;
     return PartialView("RememberPassSendConfirm", model);
 }