Ejemplo n.º 1
0
 /// <summary>
 /// Resets the user's password
 /// </summary>
 /// <returns></returns>
 public ActionResult ForgotPasswordSubmission()
 {
     try
     {
         int personID = personDAL.GetIDByEmail(Request.Form["confirmEmail"]);
         if (personID == 0)
         {
             ViewBag.noEmail = "No user with that email.";
             return(View("ForgotPassword"));
         }
         Person person = personDAL.GetPersonByID(personID);
         this.SendResetPasswordEmail(person);
         return(RedirectToAction("Login"));
     }
     catch
     {
         ViewBag.noEmail = "No user with that email.";
         return(View("ForgetPassword"));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Get a person by their personID
 /// </summary>
 /// <param name="personID">person ID to search</param>
 /// <returns>Person of that ID</returns>
 public Person GetPeronById(int personID)
 {
     return(personDAL.GetPersonByID(personID));
 }