From: Florent Bruneau Date: Mon, 24 Jan 2011 20:10:09 +0000 (+0100) Subject: Fix broken correctUserName. X-Git-Tag: xorg/1.1.0~170 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=460098c82ed428034260a9ebf9f4ff6e7456d5f7;p=platal.git Fix broken correctUserName. Signed-off-by: Florent Bruneau --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index f025d67..b48e166 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -603,12 +603,12 @@ function correctUserName() { var mots; // login with no space - if (u.value.contains(' ')) { + if (!u.value.contains(' ')) { return true; } mots = u.value.split(' '); // jean paul.du pont -> jean-paul.du-pont - if (u.value.indexOf('.') > 0) { + if (u.value.contains('.')) { u.value = mots.join('-'); return true; }