AIR Tip: Getting Logged In Username
Just a quick tip here:
bq. var username:String = File.userDirectory.name;
So far I know it works on Mac/Windows but I haven’t tested Linux.
Hope it helps.
Just a quick tip here:
bq. var username:String = File.userDirectory.name;
So far I know it works on Mac/Windows but I haven’t tested Linux.
Hope it helps.
September 19th, 2008 at 5:41 am
It is important to remember that there are situations where the user directory name will not equal the username. For example, if the user changes their username, the directory will still retain the old name (at least on Mac).
September 19th, 2008 at 12:28 pm
Very good point David. Any solid way to gain the username? For me, this works ’cause this is a corporate environment where usernames are set.