We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0df0852 commit b16fb7dCopy full SHA for b16fb7d
1 file changed
src/plugin/admin/app/controller/AccountController.php
@@ -58,6 +58,7 @@ public function index()
58
*/
59
public function login(Request $request): Response
60
{
61
+ $this->checkDatabaseAvailable();
62
$captcha = $request->post('captcha');
63
if (strtolower($captcha) !== session('captcha-login')) {
64
return $this->json(1, '验证码错误');
@@ -247,4 +248,11 @@ protected function removeLoginLimit($username)
247
248
}
249
250
251
+ protected function checkDatabaseAvailable()
252
+ {
253
+ if (!config('plugin.admin.database')) {
254
+ throw new BusinessException('请重启webman');
255
+ }
256
257
+
258
0 commit comments