From ee4d32a37256fadd1bd914b5e8bd90d583081b69 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 27 Dec 2013 02:12:27 +0000 Subject: [PATCH] merge heihedata branch r4153 --- 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 a61833f7..336f38f8 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_]{2,15}$/",$data['username'])) + if(mb_strlen($data['username'])<2) { - return array('error'=>"用户名应当以字母开头,由字母数字和下划线组成,并且长度在3到25个字符之间",'place'=>'username'); + return array('error'=>"用户名长度应该大于两个字符",'place'=>'username'); } }