public ActionResult Manage(AccountModel model) { if (ModelState.IsValid) { var profile = this.Profile as AccountProfile; profile.DisplayName = model.DisplayName; profile.RealName = model.RealName; profile.GravatarEmail = model.GravatarEmail; profile.Save(); } model.CanChangePassword = OAuthWebSecurity.HasLocalAccount(WebSecurity.GetUserId(User.Identity.Name)); // If we got this far, something failed, redisplay form return View(model); }
// // GET: /Account/Manage public ActionResult Manage() { var profile = this.Profile as AccountProfile; var model = new AccountModel { DisplayName = profile.DisplayName, RealName = profile.RealName, GravatarEmail = profile.GravatarEmail, CanChangePassword = OAuthWebSecurity.HasLocalAccount(WebSecurity.GetUserId(User.Identity.Name)) }; return View(model); }