Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Get the current username [kylix]

function GetCurrentUser: string; var pwrec: PPasswordRecord; begin pwrec := getpwuid(getuid); Result := pwrec.pw_name; end;