Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting current user short name




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Getting current user short name (From: Erik Buck <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.