On Tue, Aug 12, 2008 at 12:01 PM, GARRISON, TRAVIS J. <[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to