Re: Getting current user short name
Re: Getting current user short name
- Subject: Re: Getting current user short name
- From: "Adam R. Maxwell" <email@hidden>
- Date: Tue, 7 Nov 2006 19:53:00 -0800
On Nov 7, 2006, at 16:34, Erik Buck wrote:
NSUserName()
NSFullUserName()
It is not safe to assume that the name returned by NSUserName()
identifies the user
logged into the Mac OS X console. The user that started an
application could be
remotely logged in or logged in via a Unix shell.
We're using NSUserName/NSFullUserName/NSHomeDirectory functions in an
app. Is it safe to assume these return the console user for a Cocoa
GUI application since a connection to the window server is required
to run the app? If there's good reason to switch to SC, we could use
NSHomeDirectoryForUser() with SCDynamicStoreCopyConsoleUser, but I
don't see a SystemConfiguration framework equivalent for
NSFullUserName().
thanks,
Adam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden