From 793fd1ead001c4fa23900ca079e3521a49f56a43 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Tue, 6 Nov 2012 07:45:11 +0000 Subject: [PATCH] =?UTF-8?q?Change=20la=20taille=20max=20authoris=C3=A9=20d?= =?UTF-8?q?es=20login=20alternC=20pour=20permettre=20d'avoir=20au=20moins?= =?UTF-8?q?=20quelques=20users=20mysql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bureau/class/m_admin.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_admin.php b/bureau/class/m_admin.php index dc0d7f08..8bd43885 100644 --- a/bureau/class/m_admin.php +++ b/bureau/class/m_admin.php @@ -326,8 +326,11 @@ class m_admin { $err->raise("admin", _("Login can only contains characters a-z and 0-9")); return false; } - if (strlen($login) > 16) { - $err->raise("admin",_("The login is too long (16 chars max)")); + if (strlen($login) > 14) { + // Not an arbitrary value : MySQL user names can be up to 16 characters long + // If we want to allow people to create a few mysql_user (and we want to!) + // we have to limit the login lenght + $err->raise("admin",_("The login is too long (14 chars max)")); return false; } // Some login are not allowed...