I was changing some settings when I came across the user id in the accounts section. For some inexplicable reason I thought it meant my network User ID, ie what I would identify to a router with. No idea why I thought this. Anyway.
I changed my User ID. I am still logged in. I cannot open any programs, including terminal, to try and change it back.
Currently open programs include: Finder (downloads folder), Firefox, Sublime and Outlook.
Currently I'm afraid to reboot. However I do have access to several other Windows/Linux machines and lots of flash drives if I need to download/install/prep a live boot/etc.
I need to figure out how to change my User ID back.
Solution I'm currently trying to work: I have a file explorer open. I have sublime open.
If I can find where OS X stores the User ID, I might be able to navigate to it and change it back to whatever it's supposed to be (501 I think?).
If anyone else has any ideas or solutions, I am all ears. In any case, I will post an update when it's solved one way or the other.
Edit: Update (since I said I would). The problem has been solved, Klanomath's solution below worked perfectly first time through. Thank you!