• 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: Getting the name of the current user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the name of the current user


  • Subject: Re: Getting the name of the current user
  • From: email@hidden
  • Date: Thu, 30 Aug 2001 22:38:06 -0500

On Thursday, August 30, 2001, at 10:02 PM, Kurt Revis wrote:

Is there an API in Cocoa (or Carbon I guess) to get the name of the current
user under OS X? Searching the apple docs got me nothing.

Use the function NSUserName(), which is in Foundation. This is documented in the "Functions" section of the HTML documentation, which is very easy to overlook.

(I wonder how many answers this question will get? No one's answered it yet, but surely we're all typing away at the same time...)

Five, apparently. Six, if you count this one...8-)

Brian

email@hidden http://personalpages.tds.net/~brian_hill

"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman


References: 
 >Re: Getting the name of the current user (From: Kurt Revis <email@hidden>)

  • Prev by Date: Re: Java IDE for Swing: nib approach vs code generation?
  • Next by Date: Re: Abstract classes and methods
  • Previous by thread: Re: Getting the name of the current user
  • Next by thread: Re: Getting the name of the current user
  • Index(es):
    • Date
    • Thread