From 8d01826db345b1dda8cbdf2e5f3de040f90c8872 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 16 Dec 2013 02:28:33 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/module/Users/Operation/LoginOperate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/module/Users/Operation/LoginOperate.php b/application/module/Users/Operation/LoginOperate.php index 8f21200d..31077007 100644 --- a/application/module/Users/Operation/LoginOperate.php +++ b/application/module/Users/Operation/LoginOperate.php @@ -45,9 +45,9 @@ class LoginOperate implements \Users\Event\LoginEvent 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'); } }