Collaboration Framework: CBIdentityPickerMBS class
Well, Apple has a Collaboration framework for managing identities. For details, please read the Introduction to Identity Services Programming Guide from Apple.
In our plugin we have a couple of classes: CBIdentityAuthorityMBS, CBIdentityPickerMBS, CBIdentityMBS, CBUserIdentityMBS and CBGroupIdentityMBS.
This may be useful in the future with other functions. But for now you can use it to learn about user and groups on a Mac.
Today I worked on this and got a few example code snippets for the documentation. Should be ready with next plugin prerelease.