• 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 full user name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the full user name


  • Subject: Re: getting the full user name
  • From: j o a r <email@hidden>
  • Date: Sat, 29 Oct 2005 11:05:45 +0200


On 29 okt 2005, at 04.09, Herbert wrote:

I need to build a list of users. Getting the short name is easy, you can get the directory list from the Users directory.

Aouch... Not a nice way to do it! And besides, there is nothing stopping an admin from placing user home directories somewhere else. At work we have NFS mounted home directories for example, they're not found at /Users. At home I have separate system and user partitions, and I don't keep my user directories at /Users.


I'd like to show the full names in the list. I found some source for niutil that I guess will work, but I was wondering if there is a Cocoa way to do it.

I see a method for getting the full name of the current user, but not of anyone else.

Have I missed something?

You should use the DirectoryService.framework. There is a chapter in Dalrymple & Hillegass "Core Mac OS X and UNIX Programming" on that topic if you need some pointers. Or look for documentation and sample code snippets from Apple and by way of Google.


j o a r



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >getting the full user name (From: Herbert <email@hidden>)

  • Prev by Date: Re: getting the full user name
  • Next by Date: Re: getting the full user name
  • Previous by thread: Re: getting the full user name
  • Next by thread: FSDirectorySize code finished
  • Index(es):
    • Date
    • Thread