修改了验证的用户名长度

This commit is contained in:
Li Jianxuan 2013-12-16 02:28:33 +00:00
parent 72f4a0e09f
commit 8d01826db3
1 changed files with 2 additions and 2 deletions

View File

@ -45,9 +45,9 @@ class LoginOperate implements \Users\Event\LoginEvent
if(!empty($data['username'])) if(!empty($data['username']))
{ {
if(!preg_match("/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/",$data['username'])) if(!preg_match("/^[a-zA-Z][a-zA-Z0-9_]{2,25}$/",$data['username']))
{ {
return array('error'=>"用户名应当以字母开头,由字母数字和下划线组成,并且长度在5到25个字符之间",'place'=>'username'); return array('error'=>"用户名应当以字母开头,由字母数字和下划线组成,并且长度在3到25个字符之间",'place'=>'username');
} }
} }