combined single utility function for deriving UID from ldap search result