Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (foundUser != null && string.Compare(password, repeatPassword, false) == 0)
- {
- foundUser.Password = CreateHash(password);
- db.Entry(foundUser).State = EntityState.Modified;
- db.SaveChanges();
- return RedirectToAction("Index");
- }
- else if (foundUser == null)
- ModelState.AddModelError("", "User not found! Please provide correct name and e-mail");
- else if (string.Compare(password, repeatPassword, false) != 0)
- ModelState.AddModelError("", "Passwords are not the same!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement