DEL tout ce qui concerne la gestion du CAPTCHA
[euphorik.git] / modules / erl / euphorik_protocole.erl
index 251d4c1..f56a335 100755 (executable)
@@ -8,8 +8,6 @@
 
 -module(euphorik_protocole).
 -export([
-   %generation_captcha/1, Obsolète
-   %nouveau_user_captcha/1, Obsolète
    nouveau_user_login/1,
    login/1,
    logout/1,
 -include("../include/euphorik_bd.hrl").\r
 -include("../include/euphorik_defines.hrl").\r
 
-
-% Génère un nouveau captchat dans ?DOSSIER_CAPTCHA\r
-% Obsolète
-%~ generation_captcha(_) ->
-   %~ {Mot_crypt, Nom_fichier} = captcha:create(5, ?DOSSIER_CAPTCHA),
-   %~ simple_xml_to_string(xml_reponse_generation_captcha(?DOSSIER_CAPTCHA_RELATIF "/" ++ Nom_fichier, Mot_crypt)).
-   
-\r
-% Un nouvel utilisateur doit être créé.\r
-% Obolète : le captcha n'existe plus
-% Action est un xmlElement().
-%~ nouveau_user_captcha(Action) ->
-   %~ simple_xml_to_string(\r
-      %~ case {xmerl_xpath:string("captchaCrypt", Action), xmerl_xpath:string("captchaInput", Action)} of\r
-         %~ {[#xmlElement{content = [#xmlText{value = C1}]}], [#xmlElement{content = [#xmlText{value = C2}]}]} ->\r
-            %~ C2_crypt = common:crypt(C2),\r
-            %~ if C1 =:= C2_crypt ->\r
-                  %~ Cookie = generer_cookie(),\r
-                  %~ User = euphorik_minichat:nouveau_user("Paul", Cookie),\r
-                  %~ xml_reponse_login_ok(User);\r
-               %~ true ->
-                  %~ xml_reponse_login_pas_ok("Captcha incorrect")\r
-            %~ end;
-         %~ _ ->
-            %~ xml_reponse_login_pas_ok("XML malformé")\r
-      %~ end
-   %~ ).
-   
    
 % Une utilisateur s'enregistre avec un tuple {Login, Password}.\r
 % @spec nouveau_user_login(xmerl:xmlElement()) -> string()
@@ -374,16 +344,5 @@ xml_reponse_message(Ok) ->
          ]\r
       }\r
    ].
-\r
-\r
-% Obsolète
-%~ xml_reponse_generation_captcha(Chemin, Captcha) ->
-   %~ [
-      %~ {reponse, [{name, "generationCaptcha"}],
-         %~ [
-            %~ {chemin, [], [Chemin]},
-            %~ {captchaCrypt, [], [Captcha]}
-         %~ ]
-      %~ }
-   %~ ].
+
 %%%%%%%%% </réponses XML> %%%%%%%%%