anchor.diff:      lists:append(get_addresses_for_user(User), get_addresses_for_users(Rest)).
   
   
  -%% Gets all addresses for a user. Used for example
  -%% to check if a request from a user has an acceptable
  -%% From: header.
  +%%--------------------------------------------------------------------
  +%% Function: get_addresses_for_user(User)
  +%%           User = string()
  +%% Descrip.: Get all possible addresses of a user. Both configured
  +%%           ones, and implicit ones. Used for example to check if a
  +%%           request from a user has an acceptable From: header.
  +%% Returns : Addresses |
  +%%           error
  +%%           Addresses = list() of string()
  +%%--------------------------------------------------------------------
   get_addresses_for_user(User) ->
       case phone:get_user(User) of
   	{atomic, []} ->
   	    logger:log(debug, "userdb-mnesia: No such user ~p", [User]),
   	    nomatch;
  -	{atomic, [UserEntry]} ->
  +	{atomic, [_UserEntry]} ->
  +	    %% Ok, user exists
   	    case phone:get_numbers_for_user(User) of
   		{atomic, []} ->
   		    logger:log(debug, "userdb-mnesia: No numbers for user ~p", [User]),
  
positive.code: 	    error
      end.
  
  get_telephonenumber_for_user(User) ->
      case phone:get_numbers_for_user(User) of
  	{atomic, [FirstNumber | _]} ->
  
negative.code: 	    nomatch
      end.
  
  %%--------------------------------------------------------------------
  %% Function: get_forwards_for_users(Usernames)
  %%           Usernames = list() of string()
  %% Descrip.: Return a list of forwards for this user. Forwards are
  %%           currently not in the main Yxa CVS repository - Magnus has
  %%           some CVS merging to do.
  %% Returns : list() of Unknown |
  %%           nomatch
  %%--------------------------------------------------------------------
  get_forwards_for_users(In) ->
      get_forwards_for_users2(In, []).
  
  