public ActionResult RepeatActivation(RegainModel model) { if (ModelState.IsValid) { if (SecurityService.ValidateUser(model.EMailRem, model.Captcha, true, ModelState)) { var acc = meridian.accountsStore.GetAccountsByLogin(model.EMailRem); if (acc != null) { mailer.SendActivationMail(acc.ShortName, acc.email, acc.activation_guid); } return View("Remember", new RegainModel() { Success = true, repeatActivation = true }); } } model.Captcha = string.Empty; model.repeatActivation = true; return View("Remember", model); }
public ActionResult RememberPassword(RegainModel model) { if (ModelState.IsValid) { if (SecurityService.ValidateUser(model.EMailRem, model.Captcha, false, ModelState)) { var account = SecurityService.RememberPassword(model.EMailRem); if (account != null) //Выслать на почту письмо с кодом восстановления mailer.SendRegainPasswordMail(account.NameAndSurname, account.email, account.rememberpass_guid); return PartialView("Widgets/Remember", new RegainModel() { Success = true }); } } model.Captcha = string.Empty; return PartialView("Widgets/Remember", model); }