Re: Determine who ran an application
Re: Determine who ran an application
- Subject: Re: Determine who ran an application
- From: Jason Coco <email@hidden>
- Date: Tue, 12 Aug 2008 13:03:20 -0400
On Aug 12, 2008, at 12:01 , GARRISON, TRAVIS J. 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. I tried to Google for this but did not
have
any luck. Any ideas?
If you just need the basic user id, you can use getuid(2). There are
various API in the security frameworks and the directory services
(10.5+) frameworks that map it to more useful Mac OS Specific user
information.Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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