예제 #1
0
        public void ResetPassword(int AccountID)
        {
            Account account = accountContext.GetAccount(AccountID);

            string newPassword = Encrypter.Encrypt("ShoeShop01!", account.Login.Salt);

            string subject = "Recover password for Shoe Shop";
            string message = "Dear " + account.Login.UserName + "," + Environment.NewLine +
                             Environment.NewLine +
                             "You have requested a new password." + Environment.NewLine +
                             "Your new password is : ShoeShop01!" + Environment.NewLine +
                             Environment.NewLine +
                             "With kind regards," + Environment.NewLine +
                             "Shoe Shop";

            account.Login.HashedPassword = newPassword;

            accountContext.UpdateAccount(account);
            emailLogic.SendEmail(account.Email, subject, message);
        }