From 71d20e35a93882400cc956474cfd2c8e8309d902 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 23 Apr 2014 04:30:30 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E6=96=87=E4=B8=BA?= =?UTF-8?q?=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/module/Users/Account.php | 18 +++++++++--------- .../module/Users/Operation/LoginOperate.php | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/application/module/Users/Account.php b/application/module/Users/Account.php index 0f94658e..44438e43 100644 --- a/application/module/Users/Account.php +++ b/application/module/Users/Account.php @@ -140,9 +140,9 @@ class Account extends \Zend_Controller_Plugin_Abstract }else{ if($id === false) { - return array('error'=>'服务器开小差了,请稍后再试'); + return array('error'=>'A error occurred,try later'); }else{ - return array('error'=>'服务器处理中遇到错误,请联系管理员'); + return array('error'=>'A error occurred,try later'); } } @@ -210,9 +210,9 @@ class Account extends \Zend_Controller_Plugin_Abstract return array('success'=>1); }else{ - return array("error"=>"用户信息验证失败,请重新登录"); + return array("error"=>"Wrong information with in your private data"); } - return array('error'=>'处理中发现错误,请重试'); + return array('error'=>'A error occurred'); } //注册信息参数 @@ -287,7 +287,7 @@ class Account extends \Zend_Controller_Plugin_Abstract unset($data['password_new']); unset($data['password_confirm']); }else{ - return "参数错误"; + return "A error occurred"; } $dbh = new dbh(); @@ -317,7 +317,7 @@ class Account extends \Zend_Controller_Plugin_Abstract if(!isset($row['username']) || empty($row['username'])) { - return array('error'=>"此邮箱并未注册",'place'=>'email'); + return array('error'=>"this email was not found",'place'=>'email'); } $salt = md5($email.'--'.time().'--'.$row['username']); @@ -327,7 +327,7 @@ class Account extends \Zend_Controller_Plugin_Abstract if($state<1) { - return array('error'=>"处理中出现错误,请重试",'place'=>'email'); + return array('error'=>"A error occurred",'place'=>'email'); } $mail_data = array( @@ -363,12 +363,12 @@ class Account extends \Zend_Controller_Plugin_Abstract if(!isset($row['username']) || empty($row['username'])) { - return array('error'=>"您提供的校验码不正确,请重新申请重置密码",'place'=>'confirm_password'); + return array('error'=>"captcha is wrong",'place'=>'confirm_password'); } if($row['username'] !== $data['username']) { - return array('error'=>"您提供的校验码不正确,请重新申请重置密码",'place'=>'confirm_password'); + return array('error'=>"captcha is wrong,please reset password again",'place'=>'confirm_password'); } $sql = "UPDATE {$this->memberTable} SET password='".md5($data['password'])."',salt='' WHERE id={$row['id']}"; diff --git a/application/module/Users/Operation/LoginOperate.php b/application/module/Users/Operation/LoginOperate.php index 336f38f8..a770820d 100644 --- a/application/module/Users/Operation/LoginOperate.php +++ b/application/module/Users/Operation/LoginOperate.php @@ -35,25 +35,25 @@ class LoginOperate implements \Users\Event\LoginEvent if(!is_array($data)) { - return "参数错误"; + return "parameter error"; } if(empty($data['username'])) { - return array('error'=>"请输入用户名",'place'=>'username'); + return array('error'=>"Username is required",'place'=>'username'); } if(!empty($data['username'])) { if(mb_strlen($data['username'])<2) { - return array('error'=>"用户名长度应该大于两个字符",'place'=>'username'); + return array('error'=>"Username is too short (minimum is 3 characters)",'place'=>'username'); } } if(empty($data['password'])) { - return array('error'=>"请输入密码",'place'=>'password'); + return array('error'=>"Password is required",'place'=>'password'); } $sql = "SELECT id,{$this->FieldPasword} FROM {$this->tbl_member} WHERE {$this->FieldUsername}=?"; @@ -65,15 +65,15 @@ class LoginOperate implements \Users\Event\LoginEvent { if(strlen($row[$this->FieldPasword]) !== 32) { - return array('error'=>"您的密码或因安全原因或其他问题已经被重置,请先重置密码再登陆",'place'=>'password'); + return array('error'=>"your password had been reset,reset password",'place'=>'password'); } if($row[$this->FieldPasword] !== md5($data['password'])) { - return array('error'=>"密码错误",'place'=>'password'); + return array('error'=>"wrong password",'place'=>'password'); } return true; }else{ - return array('error'=>"用户不存在",'place'=>'username'); + return array('error'=>"wrong password",'place'=>'username'); } }//checkParam