about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-07 16:39:58 +0100
committerGitHub <noreply@github.com>2022-12-07 16:39:58 +0100
commited07f10ca8d4e65ec58958f300a8bb7c762ccbbd (patch)
tree928293b9f0e2ffe03497f34a6b738106a2fd0d0d
parentc52263f6f89f35414e59f95c877141a80e9bb79d (diff)
Fix failure when “Require a reason to join” is set with open registrations (#22127)
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
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