mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Add config/captcha.php and use it in place of direct env file call
This commit is contained in:
@@ -94,7 +94,7 @@ class RegisterController extends Controller
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/'],
|
||||
]);
|
||||
|
||||
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'],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user