From 460098c82ed428034260a9ebf9f4ff6e7456d5f7 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Mon, 24 Jan 2011 21:10:09 +0100 Subject: [PATCH] Fix broken correctUserName. Signed-off-by: Florent Bruneau --- htdocs/javascript/xorg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.1.4