public ActionResult ResetPass(Account model,string NewPassword) { Cryptography ch = new Cryptography(); Account acc = dal.FindAcc(model); dal.ChangePass(acc, ch.md5(NewPassword)); return RedirectToAction("Index","Login",acc); }
public void SendKey(LayoutTest.Models.Account model) { String NPass = GetUniqueKey(8); Debug.Write(NPass); Cryptography e = new Cryptography(); dal.ChangePass(model,e.md5(NPass)); string sender = dal.GetAccountEmail(model); SendMail(sender,"Your new password" ,NPass); }