登录逻辑,为了测试暂时关闭验证码
This commit is contained in:
@@ -54,10 +54,12 @@ class LoginController extends BaseAdminController
|
||||
|
||||
try {
|
||||
if (Yii::$app->request->isPost) {
|
||||
if (!$redis->exists($codeKey)) {
|
||||
throw new Exception('验证码已过期');
|
||||
} elseif ($code != $redis->get($codeKey) && $code != '999999') {
|
||||
throw new Exception('验证码错误');
|
||||
if ($code != '999999') {
|
||||
if (!$redis->exists($codeKey)) {
|
||||
throw new Exception('验证码已过期');
|
||||
} elseif ($code != $redis->get($codeKey)) {
|
||||
throw new Exception('验证码错误');
|
||||
}
|
||||
}
|
||||
/** @var $adminAccessToken AdminAccessToken */
|
||||
if ($model->load($post, '') && $adminAccessToken = $model->login()) {
|
||||
|
||||
Reference in New Issue
Block a user