|
|
@@ -127,21 +127,21 @@ class LoginForm extends Model {
|
|
|
throw new Exception('用户名或者密码错误');
|
|
|
}
|
|
|
// 校验邮箱验证码
|
|
|
- $codeObj = EmailLog::find()
|
|
|
- ->where('ADMIN_ID=:ADMIN_ID AND EMAIL=:EMAIL',
|
|
|
- [
|
|
|
- ':ADMIN_ID' => $this->_user['ID'],
|
|
|
- ':EMAIL' => $this->_user['EMAIL'],
|
|
|
- ])
|
|
|
- ->orderBy('CREATED_AT DESC')
|
|
|
- ->one()
|
|
|
- ->toArray();
|
|
|
- if (!$codeObj || !$codeObj['CODE'] || $codeObj['CODE'] != $this->code) {
|
|
|
- throw new Exception('邮箱验证码不正确,无法登录');
|
|
|
- }
|
|
|
- if ($codeObj['CREATED_AT'] + 5 * 60 < time()) {
|
|
|
- throw new Exception('验证码已过期, 请重新获取验证码');
|
|
|
- }
|
|
|
+// $codeObj = EmailLog::find()
|
|
|
+// ->where('ADMIN_ID=:ADMIN_ID AND EMAIL=:EMAIL',
|
|
|
+// [
|
|
|
+// ':ADMIN_ID' => $this->_user['ID'],
|
|
|
+// ':EMAIL' => $this->_user['EMAIL'],
|
|
|
+// ])
|
|
|
+// ->orderBy('CREATED_AT DESC')
|
|
|
+// ->one()
|
|
|
+// ->toArray();
|
|
|
+// if (!$codeObj || !$codeObj['CODE'] || $codeObj['CODE'] != $this->code) {
|
|
|
+// throw new Exception('邮箱验证码不正确,无法登录');
|
|
|
+// }
|
|
|
+// if ($codeObj['CREATED_AT'] + 5 * 60 < time()) {
|
|
|
+// throw new Exception('验证码已过期, 请重新获取验证码');
|
|
|
+// }
|
|
|
|
|
|
if(!$this->_user['IS_ENABLE']){
|
|
|
$this->_updateFailTimes($transaction,'账号已经被锁定,无法登录');
|