Skip to content

Commit

Permalink
✨ 调整登录验证顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Nov 24, 2022
1 parent b1df29b commit 5fe9665
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/ajax/page-front-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ function pk_front_login_exec()
echo pk_ajax_resp_error($data);
wp_die();
}
if (!pk_captcha_validate('login', $data['vd'])) {
echo pk_ajax_resp_error('验证码错误');
wp_die();
}
$try_open = pk_is_checked('quick_login_try_max_open');
$try_num = $try_open ? pk_get_option('quick_login_try_max_num', 3) : 0;
$try_ban_time = $try_open ? pk_get_option('quick_login_try_max_ban_time', 10) : 0;
Expand All @@ -21,10 +25,6 @@ function pk_front_login_exec()
wp_die();
}
}
if (!pk_captcha_validate('login', $data['vd'])) {
echo pk_ajax_resp_error('验证码错误');
wp_die();
}
$user = wp_signon([
'user_login' => $data['username'],
'user_password' => $data['password'],
Expand Down

0 comments on commit 5fe9665

Please sign in to comment.