CapRaffle.Domain.Implementation.AccountRepository.ChangePassword C# (CSharp) Method

ChangePassword() public method

public ChangePassword ( string email, string newPassword ) : bool
email string
newPassword string
return bool
        public bool ChangePassword(string email, string newPassword)
        {
            User user = GetUserByEmail(email);
            if (user != null)
            {
                String passwd = CreatePasswordHash(newPassword, CreateSalt(email));
                user.Password = passwd;
                context.SaveChanges();
                return true;
            }
            return false;
        }