Re: Test if app run by Guest account?
Re: Test if app run by Guest account?
- Subject: Re: Test if app run by Guest account?
- From: Andrew Farmer <email@hidden>
- Date: Thu, 26 Feb 2009 14:29:57 -0800
On 26 Feb 09, at 14:05, Karl Moskowski wrote:
I'm looking for a way to disable some features in my application if
it's being run by the Leopard Guest account.
I tried using CSIdentityQueryCreateForCurrentUser() as outlined in
the Identity Services Programming Guide to determine the current
account running the app, and when run by an admin account, it
returns the expected identity.
However, when run by Guest, the returned array of entries contains
no objects. Would that be sufficient to reliably establish that the
Guest account is current?
Comparing NSUserName() against @"guest" seems rather more
straightforward, as well as less likely to break if Apple changes the
way guest accounts are implemented.
_______________________________________________
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