anchor.diff:  	%% check op
   	case Op of
   		'get' -> Op1=read;
  -		'set' -> Op1=exmpp_xml:get_attribute(Query, binary:list_to_bin("op"), "not_found")
  +		'set' -> case exmpp_xml:has_attribute(Query, binary:list_to_bin("op")) of
  +					 true -> Op1 = exmpp_xml:has_attribute(Query, binary:list_to_bin("op"), "not_found");
  +					 false -> Op1='create'
  +				 end
   	end,	
   	lager:debug("Op ~p~n", [Op1]),
   	if
   		User_1 == User_2 -> acl_check(Op1, Occi_Node, User_1);
   		User_1 =/= User_2 ->
  -						Group_res = read_user(User_2),
  -						Group_tuple = element(2, Group_res),	
  -						lager:debug("Group :~p~n", [Group_tuple]),
  -						[H | _T] = Group_tuple,
  -						Groups = H#occi_user.groups,
  -						lager:debug("Group :~p~n", [Groups]),	
  -						case Groups of
  -							undefined ->
  -								Groupe = {group, Groups},
  -								acl_check(Op1, Occi_Node, Groupe);
  -							_ ->						
  -								Groupe = {group, Groups},
  -								lager:debug("Group :~p~n", [Groupe]),
  -								acl_check(Op1, Occi_Node, Groupe)
  -						end
  +			Group_res = read_user(User_2),
  +			Group_tuple = element(2, Group_res),	
  +			lager:debug("Group :~p~n", [Group_tuple]),
  +			[H | _T] = Group_tuple,
  +			Groups = H#occi_user.groups,
  +			lager:debug("Group :~p~n", [Groups]),	
  +			case Groups of
  +				undefined ->
  +					Groupe = {group, Groups},
  +					acl_check(Op1, Occi_Node, Groupe);
  +				_ ->						
  +					Groupe = {group, Groups},
  +					lager:debug("Group :~p~n", [Groupe]),
  +					acl_check(Op1, Occi_Node, Groupe)
  +			end
   	end.
   
   acl_check(Op1, Occi_Node, Groupe) ->
  
positive.code: 	Items = exmpp_xml:get_elements(Query, "item"),
  	lager:debug("Item ~p~n", [Items]),
  	lists:foreach(fun(Item) ->
  					User = exmpp_xml:get_attribute(Item, binary:list_to_bin("jid"), "not_found"),
  					case exmpp_xml:has_element(Item, "group") of
  						true -> Groupe = exmpp_xml:get_element(Item, "group"),
  								Groupe_Name = exmpp_xml:get_cdata(Groupe),
  				 				add_user(User, Groupe_Name),
  								lager:debug("Groupe_Name ~p~n", [Groupe_Name]),
  								lager:debug("User ~p~n", [User]);
  						false -> add_user(User),
  								 lager:debug("User ~p~n", [User])
  					end
  				end, Items).
  
  iq_roster(Session) ->
  	Roster_Iq = exmpp_client_roster:get_roster(),
  
negative.code: -define(HANDLER, occi_xmpp_rest).
  
  -record(state, {session, 
  				jid,
  				handler,
  				handler_state,
  				exists   = false}).
  
  %%%===================================================================
  %%% API
  %%%===================================================================
  
  start_link(Ref, Props) ->
  	lager:info("Starting XMPP listener: ~p~n", [proplists:get_value(jid, Props)]),
  	application:start(exmpp),
  	occi:ensure_started(epasswd),
  	gen_server:start_link({local, Ref}, ?MODULE, validate_cfg(Props), []).
  
  %%%===================================================================
  %%% gen_server callbacks
  