X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fclient.js;h=73622a4bdfc6b292c19901d389afd7ab22bd986f;hp=d7240a6d197b9e1af1d6d048c708efa6fad38e98;hb=11fe8f6d268a9b1c0a773294cc7d70ffdb6afb30;hpb=956dc2acd6aee480b5daa4def16346f9bab80056 diff --git a/js/client.js b/js/client.js index d7240a6..73622a4 100644 --- a/js/client.js +++ b/js/client.js @@ -180,13 +180,17 @@ euphorik.Client.prototype.getJSONLoginCookie = function() { * de s'autentifier avec (login, password). */ euphorik.Client.prototype.getJSONEnregistrement = function(login, password) { - var mess = { "header" : { "action" : "register", "version" : euphorik.conf.versionProtocole } }; + var mess = { + "header" : { "action" : "register","version" : euphorik.conf.versionProtocole } + }; if (login && password) { mess.login = login; mess.password = password; } + mess.profile_infos = this.getJSONProfileInfos(); + return mess; }; @@ -204,6 +208,12 @@ euphorik.Client.prototype.getJSONProfile = function() { "cookie" : this.cookie, "login" : this.login, "password" : this.password, + "profile_infos" : this.getJSONProfileInfos() + }; +}; + +euphorik.Client.prototype.getJSONProfileInfos = function() { + return { "nick" : this.pseudo, "email" : this.email, "css" : this.css, @@ -302,7 +312,7 @@ euphorik.Client.prototype.enregistrement = function(login, password) { }; /** - * Connexion. Réalisé de manière synchrone. + * Connexion. Réalisée de manière synchrone. */ euphorik.Client.prototype.connexion = function(messageJson) { var thisClient = this;