示例#1
0
 public ActionResult AccountSettings(AccountSettingsViewModel model)
 {
     var thisuser = db.Users.First(u => u.Login == User.Identity.Name);
     if (ModelState.IsValid && Crypto.VerifyHashedPassword(thisuser.Password, model.OldPassword))
     {
         thisuser.Password = Crypto.HashPassword(model.Password);
         db.SaveChanges();
     }
     return View();
 }
示例#2
0
 public ActionResult AccountSettings()
 {
     AccountSettingsViewModel model = new AccountSettingsViewModel();
     model.Login = User.Identity.Name;
     return View(model);
 }