public void CreateUser(User user) { _iUserRepository.Add(user); Save(); }
//Send Email Method public void SendResetEmail(User user) { //string mailBody = GetResetEmailBody(user.UserName); //const string mailSubject = "Your new password"; //const string mailFrom = "*****@*****.**"; //string mailTo = user.Email; //MailService mailService = new MailService(); //MailServiceResult mailResult = mailService.SendEmail(mailTo, mailFrom, mailSubject, mailBody); }
public void UpdateUser(User user) { _iUserRepository.Update(user); Save(); }
//Reset Password public bool ForgetPassword(User user) { try { if (!String.IsNullOrEmpty(user.Email)) { SendResetEmail(user); return true; } return false; } catch (ArgumentException) { return false; } catch (MembershipPasswordException) { return false; } }