How do you get the currently logged in username in a Firemonkey Delphi project? I\'m targeting both Windows and Mac.
I have XE2, but I suppose any version solution i
Another simpler solution is to get the computer name via the environment variable using GetEnvironmentVariable function as follows:
Result := GetEnvironmentVariable('USERNAME');
P.S.This solution is for Windows and Linux but you need to check your Delphi source code if it is supported.