Beispiel #1
0
        //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;
            }
        }
Beispiel #2
0
 public int Delete(User user)
 {
     var deleteUser = GetUser(user.UserName);
     _iUserRepository.Delete(deleteUser);
     return Save();
 }
Beispiel #3
0
 public int Update(User user)
 {
     _iUserRepository.Update(user);
     return Save();
 }
Beispiel #4
0
 public int Create(User user)
 {
     _iUserRepository.Insert(user);
     return Save();
 }
Beispiel #5
0
        //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);
        }