Code covered by the BSD License
by Felipe G. Nievinski
13 Aug 2011
Returns the user name or id, as informed by the operating system.
Watch this File
The code is trivial but worth having as a separate function.
Works under Windows and Linux, presumably also under modern Mac.
Getusername, Get Computer Name/Hostname, and Whoami: A Pedestrian User Id Retriever inspired this file.
Works under Linux and Windows 7. Thanks.