add captcha settings

This commit is contained in:
yggverse 2024-04-02 18:24:37 +03:00
parent b5b042b5fa
commit 630e2b21e4
2 changed files with 22 additions and 2 deletions

View file

@ -215,8 +215,17 @@ if ($config->webui->index->enabled)
);
}
$captcha = new \Gregwar\Captcha\CaptchaBuilder();
$captcha->setBackgroundColor(46, 52, 54);
$captcha = new \Gregwar\Captcha\CaptchaBuilder(
$config->webui->captcha->length,
$config->webui->captcha->phrase
);
$captcha->setBackgroundColor(
$config->webui->captcha->background->r,
$config->webui->captcha->background->g,
$config->webui->captcha->background->b
);
$captcha->build();
$_SESSION['captcha'] = $captcha->getPhrase();