Ejemplo n.º 1
0
 public ActionResult PasswordRecovery(PasswordRecoveryModel model)
 {
     if (model.PasswordAnswer != null && (model.UserName.Length > 0))
     {
         return RecoverPassword(model.UserName);
         //return RedirectToAction("Login", "Account");
     }
     else if ((model.PasswordQuestion == null) && (model.UserName.Length > 0))
     {
         //if(model.UserName > 0){redirectToAction
         try
         {
             AnswerAppDataContext db = new AnswerAppDataContext();
             User thisUser = db.Users.Single<User>(u => u.UserName.Equals(model.UserName));
             model.PasswordQuestion = thisUser.PasswordQuestion;
             return View(model);
         }
         catch
         {
             return RedirectToAction("Register", "Account");
         }
     }
     else
     {
         return View(model);
     }
 }
Ejemplo n.º 2
0
 public ActionResult PasswordRecovery(PasswordRecoveryModel model, string argument)
 {
     return View(model);
 }