|
|
@@ -112,21 +112,21 @@ class LoginForm extends Model {
|
|
|
try{
|
|
|
$this->getUser();
|
|
|
if(!$this->_user){
|
|
|
- throw new Exception('账号不存在');
|
|
|
+ throw new Exception('The account does not exist'); // 账号不存在
|
|
|
}
|
|
|
if(!$this->_user['IS_ENABLE']){
|
|
|
$this->_updateFailTimes($transaction,'账号已经被锁定,无法登录');
|
|
|
- throw new Exception('账号已经被锁定,无法登录');
|
|
|
+ throw new Exception('The account has been locked and cannot be logged in'); // 账号已经被锁定,无法登录
|
|
|
}
|
|
|
if (!$this->_user->validatePassword($this->password)) {
|
|
|
$this->_updateFailTimes($transaction,'用户名或者密码错误');
|
|
|
- throw new Exception('用户名或者密码错误');
|
|
|
+ throw new Exception('Incorrect user name or password'); // 用户名或者密码错误
|
|
|
}
|
|
|
//验证IP
|
|
|
$bindIp = trim($this->_user['BIND_IP']);
|
|
|
if(!empty($bindIp) && !(new LoginIpChecker(Yii::$app->request->getUserIP(), $bindIp))->validate()){
|
|
|
$this->_updateFailTimes($transaction,'登录IP与此账号绑定的IP不符');
|
|
|
- throw new Exception('登录IP与此账号绑定的IP不符'.$bindIp);
|
|
|
+ throw new Exception('The login IP does not match the IP bound to this account'.$bindIp); // 登录IP与此账号绑定的IP不符
|
|
|
}
|
|
|
|
|
|
//需要修改密码
|