"Have you tried deleting the record and performing a forced inventory while a user is currently logged in? Interested in if the issue follows some computers and not others. Just guessing here as I am not a programmer."
Okay, so I tested your theory and you are correct. I deleted the record from a computer that was missing the username on OCS and reinstalled it while the user was logged out and it came back without a username again. And than I tested it when a user was logged in and it works however, the next time the inventory runs and the user is logged out the username is gone again. So it seems that it only does this when the user is logged out. There has to be a way to add rights or something allowing it to work.