Code covered by the BSD License
Felipe G. Nievinski
Felipe G. Nievinski (view profile)
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 on Mac. Simple as you said but very useful to get.
Works under Linux and Windows 7. Thanks.