anchor.diff:      lists:usort(Res);
   get_forwards_for_users2([H | T], Res) ->
       case get_forward_for_user(H) of
  -	error ->
  -	    error;
   	nomatch ->
   	    get_forwards_for_users2(T, Res);
   	Fwd ->
  
positive.code: 	{atomic, []} ->
  	    logger:log(debug, "userdb-mnesia: No such user ~p when fetching password", [User]),
  	    nomatch;
  	{atomic, [A]} ->
  	    {Password, _Flags, _Classes} = A,
  	    Password;
  	Unknown ->
  	    logger:log(error, "userdb-mnesia: Unexpected result from phone:get_user(), user ~p result : ~p",
  
negative.code: %%--------------------------------------------------------------------
  %% Function: get_telephonenumber_for_user(User)
  %%           User = string()
  %% Descrip.: Return the telephone number for a user.
  %% Returns : Number  |
  %%           nomatch
  %%           Number = string()
  %%--------------------------------------------------------------------
  get_telephonenumber_for_user(User) ->
      case phone:get_numbers_for_user(User) of
  	{atomic, []} ->
  	    logger:log(debug, "userdb-mnesia: No numbers for user ~p", [User]),
  	    nomatch;
  	{atomic, [FirstNumber | _]} when is_list(FirstNumber) ->
  	    %% XXX what says that the first entry was a telephone number and not some other address?
  	    FirstNumber;
  	Unknown ->
  	    logger:log(error, "userdb-mnesia: Unexpected result from phone:get_numbers_for_user(), user ~p result : ~p",
  		       [User, Unknown]),
  	    error
      end.
  
  %%--------------------------------------------------------------------
  