public ActionResult Update() { IBO ibo = IBOVirtualAPI.GetIBOByUId(WebSecurity.CurrentUserId.ToString()); ViewBag.languages = languages; return(View(ibo)); }
public ActionResult Forgot(ForgotModel model) { if (WebSecurity.GetUserId(model.UserName) > -1 && (WebSecurity.IsConfirmed(model.UserName))) { string token = WebSecurity.GeneratePasswordResetToken(model.UserName, 1200); /* Get IBO Email */ IBO ibo = IBOVirtualAPI.GetIBOByUId(WebSecurity.GetUserId(model.UserName).ToString()); /* Set And Send Email Reset Request */ ResertEmailContact contact = new ResertEmailContact(); contact.name = model.UserName; contact.email = ibo.email; contact.token = token; bool result = IBOVirtualAPI.CreateResetEmail(contact); } else { ModelState.AddModelError(String.Empty, TextResources.Businesslms.ErrorUserNotFound); } return(View(model)); }