I think you can use the same idea as here:
Mac OSX: determining if a user account is an Active Directory user and a local user using objective-c
you just need to search for Network or Authentication node (this is a type of kODNodeTypeAuthentication) and query for kODAttributeTypeRecordName with the request value set for the current username. Then look at the search result, there you will find many interesting things :)
mcFactor
source share