anchor.diff:  		{struct, Object} = mochijson:decode(RequestBody),
   		{_, ID} = lists:keyfind("id", 1, Object),
   		{_, {array, Characteristic}} = lists:keyfind("characteristic", 1, Object),
  -			F1 = fun(_F, [{struct, [{"name", "password"}, {"value", Pass}]} | _]) ->
  -						Pass;
  -					(_F, [{struct, [{"value", Pass}, {"name", "password"}]} | _]) ->
  -						Pass;
  -					(F, [_ | T]) ->
  -						F(F,T)
  -			end,
  +		F1 = fun(_F, [{struct, [{"name", "password"}, {"value", Pass}]} | _]) ->
  +					Pass;
  +				(_F, [{struct, [{"value", Pass}, {"name", "password"}]} | _]) ->
  +					Pass;
  +				(F, [_ | T]) ->
  +					F(F,T)
  +		end,
   		Password = F1(F1, Characteristic),
  -			F2 = fun(_F, [{struct, [{"name", "locale"}, {"value", Locale}]} | _]) ->
  -						Locale;
  -					(_F, [{struct, [{"value", Locale}, {"name", "locale"}]} | _]) ->
  -						Locale;
  -					(F, [_ | T]) ->
  -						F(F,T)
  -			end,
  +		F2 = fun(_F, [{struct, [{"name", "locale"}, {"value", Locale}]} | _]) ->
  +					Locale;
  +				(_F, [{struct, [{"value", Locale}, {"name", "locale"}]} | _]) ->
  +					Locale;
  +				(F, [_ | T]) ->
  +					F(F,T)
  +		end,
   		Locale = F2(F2, Characteristic),
  -		LastModified = {erlang:system_time(milli_seconds),
  +		LastModified = {erlang:system_time(?MILLISECOND),
   				erlang:unique_integer([positive])},
   		case mod_auth:add_user(ID, Password, [{locale, Locale},
   				{last_modified, LastModified}] , Address, Port, Directory) of
  
positive.code: 		Etag1 = etag(Etag),
  		patch_user1(ID, Etag1, CType, ReqBody)
  	catch
  		_:_ ->
  			{error, 400}
  	end.
  %% @hidden
  
negative.code: 	process_json_patch1(Ops, ID, []).
  %% @hidden
  process_json_patch1([{struct, Attr}| T], ID, Acc) ->
  	case {lists:keyfind("op", 1, Attr), lists:keyfind("path", 1, Attr)} of
  		{{_, "replace"}, {_, "/characteristic/" ++ _}} ->
  			ok;
  		{{_, "add"}, {_, "/characteristic/-"}} ->
  			ok
  	end,
  	{_, {struct, Value}} = lists:keyfind("value", 1, Attr),
  	case lists:keyfind("name", 1, Value) of
  		{_, "password"} ->
  			{_, NewPassword} = lists:keyfind("value", 1, Value),
  			process_json_patch1(T, ID, [{"password", NewPassword} | Acc]);
  		{_, "locale"} ->
  			{_, NewLocale} = lists:keyfind("value", 1, Value),
  			process_json_patch1(T, ID, [{"locale", NewLocale} | Acc]);
  		false ->
  			process_json_patch1(T, ID, Acc)
  	end;
  process_json_patch1([], ID, Acc) ->
  	{Port, Address, Directory, _} = get_params(),
  	case mod_auth:get_user(ID, Address, Port, Directory) of
  		{ok, #httpd_user{password = OPassword, user_data = UserData}} ->
  			LastModified = case lists:keyfind(last_modified, 1, UserData) of
  				{_, LM} ->
  					LM;
  				false ->
  					{erlang:system_time(?MILLISECOND), erlang:unique_integer([positive])}
  			end,
  			OLocale = case lists:keyfind(locale, 1, UserData) of
  				{_, Loc} ->
  					Loc;
  				false ->
  					"en"
  			end,
  			Password = case lists:keyfind("password", 1, Acc) of
  				false ->
  