diff --git a/application/module/Users/Operation/RegisterOperate.php b/application/module/Users/Operation/RegisterOperate.php index b9985674..0c02b560 100644 --- a/application/module/Users/Operation/RegisterOperate.php +++ b/application/module/Users/Operation/RegisterOperate.php @@ -45,7 +45,7 @@ class RegisterOperate implements \Users\Event\RegisterEvent if(!empty($data['username'])) { - if(!preg_match("/^[a-zA-Z\xa0-\xff_][0-9a-zA-Z\xa0-\xff_]{2,25}$/",$data['username'])) + if(!preg_match("/[0-9a-zA-Z\xa0-\xff_]{2,25}/",$data['username'])) { return array('error'=>"用户名只能包含字母汉字数字和下划线,并且长度在2到26个字符之间",'place'=>'username'); }