X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=modules%2Ferl%2Feuphorik_protocole.erl;h=d99e4cc1e303b2e70a20efe6cb8d77231ba7d53c;hp=58a8df935f1fdfef4c9a037426d579d0bacf5c18;hb=c021866458e347a8c704217247ba207ad99c5cb7;hpb=4c8bece326d3f8f7d65faf7f80a19cf796fb46d1 diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index 58a8df9..d99e4cc 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -91,7 +91,7 @@ loginUser(_, _) -> % Renvoie un string() représentant un cookie en base 36. Il y a 10^32 possibillités. generer_cookie() -> - {A1,A2,A3} = now(), + {A1, A2, A3} = now(), random:seed(A1, A2, A3), erlang:integer_to_list(random:uniform(math:pow(10, 32)), 36). @@ -111,6 +111,8 @@ profile( {email, Email}, {css, Css}, {nick_format, Nick_format_str}, + {view_times, View_times}, + {view_tooltips, View_tooltips}, {main_page, Main_page}, {conversations, {array, Conversations_json}} ] @@ -128,7 +130,19 @@ profile( [], Conversations_json ), - case euphorik_bd:set_profile(Cookie, Login, Password, Pseudo, Email, Css, list_to_atom(Nick_format_str), Main_page, Conversations) of + % TODO : pas très beau, mieux vaut construire un #user + case euphorik_bd:set_profile( + Cookie, + Login, + Password, + Pseudo, + Email, + Css, + list_to_atom(Nick_format_str), + View_times, + View_tooltips, + Main_page, + Conversations) of ok -> json_reponse_ok(); login_deja_pris -> @@ -662,6 +676,8 @@ json_reponse_login_ok(User) -> {email, User#user.email}, {css, User#user.css}, {nick_format, atom_to_list(User#user.nick_format)}, + {view_times, User#user.view_times}, + {view_tooltips, User#user.view_tooltips}, {main_page, User#user.page_principale}, {conversations, {array,