• 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: Cocoa way to get list of user accounts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa way to get list of user accounts?


  • Subject: Re: Cocoa way to get list of user accounts?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 11 Mar 2008 10:01:28 +0100

Le 11 mars 08 à 09:51, Andrew Farmer a écrit :

On 11 Mar 08, at 01:01, Mac QA wrote:
On 3/11/08, Jean-Daniel Dupas <email@hidden> wrote:
As far as I know, the only reliable way to get users accounts is to
use DirectoryServices ... you also have to be aware
that the local user list storage has change between 10.4 and 10.5

Thanks for the info. Sounds none too convenient. I just realized I
could just list the /Users directory and filter out the Shared entry.
Granted, someone could have created a folder there that isn't really a
valid user, but seems like an OK 95% solution. :-)


users = [[NSFileManager defaultManager] directoryContentsAtPath:@"/ Users/"];

Fails spectacularly in some networked environments, though - user home directories aren't necessarily in /Users.



Even on certain local environment. In Leopard, there is an option in the preference pane to move your local folder. (in advanced options), and before that, it was already possible to move the home directory (I do that since 10.2 to store my profile on a secondary hrad drive)_______________________________________________


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: 
 >Cocoa way to get list of user accounts? (From: "Mac QA" <email@hidden>)
 >Re: Cocoa way to get list of user accounts? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Cocoa way to get list of user accounts? (From: "Mac QA" <email@hidden>)
 >Re: Cocoa way to get list of user accounts? (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Cocoa way to get list of user accounts?
  • Next by Date: Re: warning: assignment from distinct Objective-C type
  • Previous by thread: Re: Cocoa way to get list of user accounts?
  • Next by thread: Re: Cocoa way to get list of user accounts?
  • Index(es):
    • Date
    • Thread