Re: Determine who ran an application
Re: Determine who ran an application
- Subject: Re: Determine who ran an application
- From: "Kyle Sluder" <email@hidden>
- Date: Tue, 12 Aug 2008 13:04:41 -0400
On Tue, Aug 12, 2008 at 12:01 PM, GARRISON, TRAVIS J. <email@hidden> wrote:
> I am new to Cocoa and Xcode, so please bear with me. I am editing an
> existing application that we have. The application is set to run when
> the user logs into the machine through a loginHook. We have to pass the
> %USER% variable as an argument. I would like to pull the username from
> directly in the application.
What is it you're trying to do? If you need the user's username,
there are two functions for that: NSFullUserName (long user name) and
NSUserName (short name, aka the UNIX username). If you need their
home directory, use NSHomeDirectory. If you're trying to do
authentication, you should really be using Kerberos. If the account
exists in an Open Directory or Active Directory domain, you may need
to use Directory Services to get the info you're after...
So, in other words, we really need to know your specific goal.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden