Determine User type

Discussion in 'Mac Programming' started by ruhi, Oct 23, 2009.

  1. macrumors member

    Joined:
    Jun 17, 2009
    #1
    Hello,

    How can i determine the current user type i.e. admin, standard user through my cocoa application?

    Thanks,
    Ruhi.
     
  2. macrumors 603

    Joined:
    Aug 9, 2009
    #2
    Call the BSD function getgroups() and look for the presence of the admin group (80).

    This may not be useful, though. The human using the computer could have a user account that's not in the admin group, but that human still knows an admin-user's name and password.
     
  3. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3

Share This Page