anchor.diff:  %%--------------------------------------------------------------------
   %% @private
   %% @doc
  -%% Returns a client-compliant user record based on space id.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec user_record(UserId :: od_user:id()) -> proplists:proplist().
  -user_record(UserId) ->
  -    {ok, #document{value = #od_user{
  +%% Returns a client-compliant user record based on user id.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec user_record(Client :: n_entity_logic:client(), UserId :: od_user:id()) ->
  +    proplists:proplist().
  +user_record(Client, UserId) ->
  +    {ok,#od_user{
           name = Name,
           alias = UserAlias,
           basic_auth_enabled = BasicAuthEnabled,
           connected_accounts = OAuthAccounts,
           client_tokens = ClientTokenIds,
           default_space = DefaultSpaceValue,
  -        default_provider = DefaultProviderValue
  -    }}} = od_user:get(UserId),
  +        default_provider = DefaultProviderValue,
  +        eff_groups = Groups,
  +        eff_spaces = Spaces,
  +        eff_providers = Providers
  +    }} = n_user_logic:get(Client, UserId),
       Alias = case str_utils:to_binary(UserAlias) of
           <<"">> -> null;
           Bin -> Bin
  
positive.code: -spec find_record(ResourceType :: binary(), Id :: binary()) ->
      {ok, proplists:proplist()} | gui_error:error_result().
  find_record(<<"user">>, UserId) ->
      case gui_session:get_user_id() of
          UserId ->
              {ok, user_record(UserId)};
          _ ->
              gui_error:unauthorized()
      end.
  
  
  %%--------------------------------------------------------------------
  
negative.code:         undefined -> null;
          _ -> DefaultProviderValue
      end,
      [
          {<<"id">>, UserId},
          {<<"name">>, Name},
  