Re: Obtaining Current User Name
Re: Obtaining Current User Name
- Subject: Re: Obtaining Current User Name
- From: Vince DeMarco <email@hidden>
- Date: Thu, 7 Jun 2001 21:46:25 -0700
On Thursday, June 7, 2001, at 05:53 PM, Karl Goiser wrote:
Hello,
Could somebody please tell me how to obtain information about the
currently logged in user?
(Sorry if this is a dumb question, but I really don't know where to
look...)
If this is for a cocoa application use
NSUserName()
if this is a background unix app, use getpwuid() along with
getuid()/geteuid()
(see the man page for getpwuid())
vince