From ed07f10ca8d4e65ec58958f300a8bb7c762ccbbd Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 7 Dec 2022 16:39:58 +0100 Subject: Fix failure when “Require a reason to join” is set with open registrations (#22127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3d0298927..5530a9070 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -516,7 +516,7 @@ class User < ApplicationRecord end def invite_text_required? - Setting.require_invite_text && !invited? && !external? && !bypass_invite_request_check? + Setting.require_invite_text && !open_registrations? && !invited? && !external? && !bypass_invite_request_check? end def trigger_webhooks -- cgit