diff --git a/bureau/class/m_mysql.php b/bureau/class/m_mysql.php index ae90f417..be5bf8f2 100644 --- a/bureau/class/m_mysql.php +++ b/bureau/class/m_mysql.php @@ -433,8 +433,8 @@ class m_mysql { return false; } - if(!preg_match("#^[0-9a-z_]*$#",$user)) { - $err->raise("mysql",_("Database username can contain only letters numbers and underscores")); + if(!preg_match("#^[0-9a-z_-]*$#",$user)) { + $err->raise("mysql",_("Database username can contain only letters numbers hyphen and underscores")); return false; } $db->query("select name from dbusers where name='".$user."' ;");