|
@@ -57,7 +57,7 @@ class LoginForm extends Model
|
|
|
if (!$this->hasErrors()) {
|
|
if (!$this->hasErrors()) {
|
|
|
$user = $this->getUser();
|
|
$user = $this->getUser();
|
|
|
if(!$user){
|
|
if(!$user){
|
|
|
- $this->addError($attribute, '用户名错误');
|
|
|
|
|
|
|
+ $this->addError($attribute, 'Member name error');// 用户名错误
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
// $userInfo = UserInfo::findOneAsArray('USER_ID=:USER_ID', [':USER_ID'=>$user['ID']]);
|
|
// $userInfo = UserInfo::findOneAsArray('USER_ID=:USER_ID', [':USER_ID'=>$user['ID']]);
|
|
@@ -115,33 +115,33 @@ class LoginForm extends Model
|
|
|
try{
|
|
try{
|
|
|
$this->getUser();
|
|
$this->getUser();
|
|
|
if(!$this->_user){
|
|
if(!$this->_user){
|
|
|
- throw new Exception('账号不存在');
|
|
|
|
|
|
|
+ throw new Exception('The account does not exist'); // 账号不存在
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!$this->_user->validatePassword($this->password)) {
|
|
if (!$this->_user->validatePassword($this->password)) {
|
|
|
- $this->_updateFailTimes($transaction,'用户名或密码错误');
|
|
|
|
|
- throw new Exception('用户名或密码错误');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'The member name or password is incorrect'); // 用户名或密码错误
|
|
|
|
|
+ throw new Exception('The member name or password is incorrect'); // 用户名或密码错误
|
|
|
}
|
|
}
|
|
|
// 找到会员的基本信息来判断其是否可登录
|
|
// 找到会员的基本信息来判断其是否可登录
|
|
|
if(!$this->_user['ALLOW_LOGIN']){
|
|
if(!$this->_user['ALLOW_LOGIN']){
|
|
|
- $this->_updateFailTimes($transaction,'会员编号异常');
|
|
|
|
|
- throw new Exception('会员编号异常');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'Abnormal member code'); // 会员编号异常
|
|
|
|
|
+ throw new Exception('Abnormal member code'); // 会员编号异常
|
|
|
}
|
|
}
|
|
|
if($this->_user['STATUS'] == Yii::$app->params['userStatus'][0]['value']){
|
|
if($this->_user['STATUS'] == Yii::$app->params['userStatus'][0]['value']){
|
|
|
- $this->_updateFailTimes($transaction,'会员未激活');
|
|
|
|
|
- throw new Exception('会员未激活');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'Member not activated'); // 会员未激活
|
|
|
|
|
+ throw new Exception('Member not activated'); // 会员未激活
|
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][2]['value']){
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][2]['value']){
|
|
|
- $this->_updateFailTimes($transaction,'会员已被注销');
|
|
|
|
|
- throw new Exception('会员已被注销');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'The member has been cancelled'); // 会员已被注销
|
|
|
|
|
+ throw new Exception('The member has been cancelled'); // 会员已被注销
|
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][3]['value']){
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][3]['value']){
|
|
|
- $this->_updateFailTimes($transaction,'会员已被列入黑名单');
|
|
|
|
|
- throw new Exception('会员已被列入黑名单');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'The member has been blacklisted'); // 会员已被列入黑名单
|
|
|
|
|
+ throw new Exception('The member has been blacklisted'); // 会员已被列入黑名单
|
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][9]['value']){
|
|
} elseif($this->_user['STATUS'] == Yii::$app->params['userStatus'][9]['value']){
|
|
|
- $this->_updateFailTimes($transaction,'会员已被永久关停');
|
|
|
|
|
- throw new Exception('会员已被永久关停');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'The member has been permanently suspended'); // 会员已被永久关停
|
|
|
|
|
+ throw new Exception('The member has been permanently suspended'); // 会员已被永久关停
|
|
|
} elseif($this->_user['PART_FUNC_CLOSED'] == 1){
|
|
} elseif($this->_user['PART_FUNC_CLOSED'] == 1){
|
|
|
- $this->_updateFailTimes($transaction,'会员部分功能关闭,无法登录');
|
|
|
|
|
- throw new Exception('会员部分功能关闭,无法登录');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction,'Member part of the function is closed, unable to log in.'); // 会员部分功能关闭,无法登录
|
|
|
|
|
+ throw new Exception('Member part of the function is closed, unable to log in.'); // 会员部分功能关闭,无法登录
|
|
|
} elseif($this->_user['IS_MODIFY_PASSWORD'] == 1){
|
|
} elseif($this->_user['IS_MODIFY_PASSWORD'] == 1){
|
|
|
throw new Exception(self::ERROR_IS_MODIFY_PASSWORD);
|
|
throw new Exception(self::ERROR_IS_MODIFY_PASSWORD);
|
|
|
}
|
|
}
|
|
@@ -159,8 +159,8 @@ class LoginForm extends Model
|
|
|
'BONUS_APP_CLIENT_ID' => $clientId,
|
|
'BONUS_APP_CLIENT_ID' => $clientId,
|
|
|
];
|
|
];
|
|
|
if (!User::updateAll($update, 'ID=:ID', ['ID' => $this->_user['ID']])) {
|
|
if (!User::updateAll($update, 'ID=:ID', ['ID' => $this->_user['ID']])) {
|
|
|
- $this->_updateFailTimes($transaction, '会员APP设备信息更新失败');
|
|
|
|
|
- throw new Exception('会员APP设备信息更新失败');
|
|
|
|
|
|
|
+ $this->_updateFailTimes($transaction, 'Member APP device information update failed'); // 会员APP设备信息更新失败
|
|
|
|
|
+ throw new Exception('Member APP device information update failed'); // 会员APP设备信息更新失败
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|