Stephen
VERY cool! 
Thanks very much.  I had searched for 'username' and didn't come up with this.  Where is it documented?
Mark
----- Original Message -----
Sent: Wednesday, August 15, 2001 6:32 PM
Subject: RE: [DUG]: Getting the current user

function NetworkID: string;
var  buffer : string;
     buffSize : DWORD;
     bRet: boolean;
begin
  buffSize:=128;
  SetLength(buffer,BuffSize);
  bRet := GetUserName(PChar(buffer), buffSize);
  if bRet then
     result := strpas(PChar(buffer))
  else
     Result := '';
end;
-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 17:07
To: Multiple recipients of list delphi
Subject: [DUG]: Getting the current user

Hi
 
Can I get the name of the current User from anywhere if I'm just using Paradox?
 
One of my sites wants to restrict access to data depending on particular usernames.
 
Come to think of it, it would be a better long term solution to read the Group that the current user belongs to.
 
Any pointers?
 
Thanks
 
Mark

Reply via email to