Exemplo n.º 1
0
        public bool UpdatePassword(string username, string oldPassword, string newPassword)
        {
            var result = false;

            try
            {
                if (1 == UserAccessor.ChangePasswordHash(username, HashSHA256(oldPassword), HashSHA256(newPassword)))
                {
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(result);
        }
Exemplo n.º 2
0
        public bool UpdatePassword(string username, string oldPassword, string newPassword)
        {
            var result = false;

            try
            {
                if (1 == UserAccessor.ChangePasswordHash(username, HashSHA256(oldPassword), HashSHA256(newPassword)))
                {
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            catch (Exception)
            {
                throw new ApplicationException("There was an issue when attempting to remove movie...");
            }
            return(result);
        }