anchor.diff:  -copyright('Copyright (c) 2016 - 2017 SigScale Global Inc.').
   
   -export([content_types_accepted/0, content_types_provided/0, get_params/0,
  -		get_user/2, get_users/2, post_user/1, put_user/3, patch_user/4,
  -		delete_user/1]).
  +		get_user/2, get_users/2, post_user/1, patch_user/4,
  +		delete_user/1, user/1]).
   
   -include_lib("inets/include/mod_auth.hrl").
   -include("ocs.hrl").
  
positive.code: %% resource.
  post_user(RequestBody) ->
  	try
  		{struct, Object} = mochijson:decode(RequestBody),
  		{_, ID} = lists:keyfind("id", 1, Object),
  		{_, {array, Characteristic}} = lists:keyfind("characteristic", 1, Object),
  		Filter = fun(Filter, [{struct, FilterObj} | T], ObjName) ->
  							case lists:keyfind("name", 1, FilterObj) of
  									{_, ObjName} ->
  										proplists:get_value("value", FilterObj);
  									_ ->
  										Filter(Filter, T, ObjName)
  							end;
  						(_, [], _) ->
  							undefined
  		end,
  		Password = Filter(Filter, Characteristic, "password"),
  		Locale = Filter(Filter, Characteristic, "locale"),
  		case ocs:add_user(ID, Password, Locale) of
  			{ok, LastModified} ->
  				Location = "/partyManagement/v1/individual/" ++ ID,
  				IDAttr = {struct, [{"name", "username"}, {"value", ID}]},
  				PWDAttr = {struct, [{"name", "password"}, {"value", Password}]},
  				LocaleAttr = {struct, [{"name", "locale"}, {"value", Locale}]},
  				Char = {array, [IDAttr, PWDAttr, LocaleAttr]},
  				RespObj = [{"id", ID}, {"href", Location}, {"characteristic", Char}],
  				JsonObj  = {struct, RespObj},
  				Body = mochijson:encode(JsonObj),
  				Headers = [{location, Location}, {etag, ocs_rest:etag(LastModified)}],
  				{ok, Headers, Body};
  			{error, _Reason} ->
  
negative.code: 			{error, 400}
  	end.
  
  -spec get_params() -> Result
  	when
  		Result :: {Port, Address, Directory, Group},
  		Port :: integer(),
  		Address :: string(),
  		Directory :: string(),
  		Group :: string().
  %% @doc Get {@link //inets/httpd. httpd} configuration parameters.
  get_params() ->
  	{_, _, Info} = lists:keyfind(httpd, 1, inets:services_info()),
  	{_, Port} = lists:keyfind(port, 1, Info),
  