testing the user() method to refactor with ldap_query and we now have to mock a private method, so slight change of mocking
add uid_ and gid_to_username to the prototype and identity classes under directory, also make use of ldap_query with user() as well in ldap class