Add config/captcha.php and use it in place of direct env file call

This commit is contained in:
DariusIII
2018-11-05 15:42:12 +01:00
parent a9a76c0155
commit fb7d9d6570
10 changed files with 19 additions and 8 deletions
@@ -48,7 +48,7 @@ class ForgotPasswordController extends Controller
if (empty($email) && empty($rssToken)) {
app('smarty.view')->assign('error', 'Missing parameter(email and/or apikey to send password reset');
} else {
if (env('NOCAPTCHA_ENABLED') === true && (! empty(env('NOCAPTCHA_SECRET')) && ! empty(env('NOCAPTCHA_SITEKEY')))) {
if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
$this->validate($request, [
'g-recaptcha-response' => 'required|captcha',
]);