Disable captcha if registrations are disabled for various reasons
This commit is contained in:
parent
c209cf5a09
commit
2d4faa5cfd
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,8 @@ module CaptchaConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def captcha_required?
|
def captcha_required?
|
||||||
|
return false if ENV['OMNIAUTH_ONLY'] == 'true'
|
||||||
|
return false unless Setting.registrations_mode != 'none' || @invite&.valid_for_use?
|
||||||
captcha_enabled? && !current_user && !(@invite.present? && @invite.valid_for_use? && !@invite.max_uses.nil?) && !captcha_recently_passed?
|
captcha_enabled? && !current_user && !(@invite.present? && @invite.valid_for_use? && !@invite.max_uses.nil?) && !captcha_recently_passed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue