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 08/11/06, Adam R. Maxwell <email@hidden> wrote:
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?

Depends what you want. If fast user switching is invoked, your app may be backgrounded and still running, but NSUserName() will still be the owner of your application and not the person currently logged in to the console.

-- Finlay
_______________________________________________
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>)
 >Re: Getting current user short name (From: "Adam R. Maxwell" <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.