diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index fe560fb3..0385b099 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -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);