From e955ca5463dc399694455bc25301d56499a1b6ef Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Jan 2021 06:18:30 +0100 Subject: [PATCH] Fix sign-up restrictions based on IP addresses not being enforced (#15607) Fixes #15606 Co-authored-by: Claire --- 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 f8c8a6ab5..b4508c2eb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -152,7 +152,7 @@ class User < ApplicationRecord def confirm new_user = !confirmed? - self.approved = true if open_registrations? + self.approved = true if open_registrations? && !sign_up_from_ip_requires_approval? super