public ActionResult SendCode(int area, int prefix, int number) { string phone = "1" + area.ToString() + prefix.ToString() + number.ToString(); var patient = AuthService.SendPatientToken(phone, PPOKPrincipal.generateRandomCode(TOKEN_LENGTH)); if (patient != null) { makeAuthTicket(new PPOKPrincipalSerializeModel(patient)); return(View("VerifyCode")); } else { ViewBag.Error = "That number was not found in our system."; return(View("Patient")); } }
public ActionResult ForgotPassword(string email) { var pharmcist = AuthService.SendPharmacistToken(email, PPOKPrincipal.generateRandomCode(TOKEN_LENGTH)); if (pharmcist != null) { return(View("ResetPassword")); } var sysAdmin = AuthService.SendSystemAdminToken(email, PPOKPrincipal.generateRandomCode(TOKEN_LENGTH)); if (sysAdmin != null) { return(View("ResetPassword")); } ViewBag.Error = "That email was not found"; return(View()); }