bugfixing to allow hyphen in sql user names

This commit is contained in:
Steven Mondji-Lerider 2012-10-11 12:50:42 +00:00
parent 35cf90434e
commit 4172db00b4
1 changed files with 2 additions and 2 deletions

View File

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