• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to find active user in the cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find active user in the cocoa


  • Subject: Re: How to find active user in the cocoa
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 10 Aug 2009 08:44:08 -0600

You can do this in a number of ways.

1.  Run an NSTask that executes "who am i"
2.  Use NSString to resolve ~/ and pull out the second path component
3.  Use CoreService's CSCopyUserName

And probably a host of others. These are the couple I thought of off the top of my head.

HTH,

Dave

On Aug 10, 2009, at 8:38 AM, Arun wrote:

Hi All,

Is there any way in cocoa to find who is active user if multiple users have
logged in.


Thanks
Arun
_______________________________________________

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


References: 
 >How to find active user in the cocoa (From: Arun <email@hidden>)

  • Prev by Date: How to find active user in the cocoa
  • Next by Date: Re: How to find active user in the cocoa
  • Previous by thread: How to find active user in the cocoa
  • Next by thread: Re: How to find active user in the cocoa
  • Index(es):
    • Date
    • Thread