예제 #1
0
        public static bool ValidateNewUser(string username, string newPassword)
        {
            if (1 == CustomerAccessor.FindUserByUsernameAndPassword(username, "password"))
            {
                CustomerAccessor.SetPasswordForUsername(username, "password", newPassword.HashSha256());
            }
            else
            {
                throw new ApplicationException("New user could not be created.");
            }

            return(ValidateExistingUser(username, newPassword));
        }