update application/admin/controller/Index.php.

解决登录验证码填错的时候 后台日志标题会为空

Signed-off-by: 御宅男(YznCMS创始者) <530765310@qq.com>
pull/461/head
御宅男(YznCMS创始者) 2024-02-22 09:09:12 +00:00 committed by Gitee
parent 1cc09a5a19
commit 137218ddf4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -93,10 +93,10 @@ class Index extends Backend
}
$validate = new Validate($rule, [], ['username' => __('Username'), 'password' => __('Password'), 'captcha' => __('Captcha')]);
$result = $validate->check($data);
AdminLog::setTitle(__('Login'));
if (!$result) {
$this->error($validate->getError(), $url, ['token' => $this->request->token()]);
}
AdminLog::setTitle(__('Login'));
$result = $this->auth->login($username, $password, $keeplogin ? $keeyloginhours * 3600 : 0);
if ($result === true) {
Hook::listen("admin_login_after", $this->request);