anchor.diff:  				       [Address, Foo]),
   			    error
   		    end;
  -		[{dn, _Dn, attributes, _EAttributes} | _Rest] ->
  +		[LDAPres | _Rest] when is_record(LDAPres, ldapres)->
   		    logger:log(debug, "userdb-ldap: Query for exactly one user matching address ~p failed, multiple users found",
   			       [Address]),
   		    error;
  
positive.code: 		none ->
  		    logger:log(debug, "userdb-ldap: No user found for address ~p in LDAP (server ~p)", [Address, Server]),
  		    nomatch;
  		[{dn, Dn, attributes, EAttributes}] ->
  		    case directory:get_value({dn, Dn, attributes, EAttributes}, UserAttribute) of
  			QRes when is_list(QRes) ->
  			    logger:log(debug, "userdb-ldap: Found LDAP user for ~p, dn ~p: ~p", [Address, Dn, QRes]),
  			    QRes;
  			Foo ->
  
negative.code: %% Include files
  %%--------------------------------------------------------------------
  -include("siprecords.hrl").
  -include("directory.hrl").
  
  %%====================================================================
  %% External functions
  