From b9aea0e52a3980844c7febad7aa973118811f178 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 31 Oct 2020 18:26:51 -0500 Subject: Ignore case of username confirmation --- app/models/user.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/user.rb b/app/models/user.rb index 89c2489b3..167bfd605 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -479,7 +479,10 @@ class User < ApplicationRecord end def user_might_not_be_a_spam_bot - username == account.username && (invited? || (invite_request&.text.present? && kobold_hash_matches?)) + return false unless username.downcase == account.username.downcase + + update(username: account.username) unless username == account.username + invited? || (invite_request&.text.present? && kobold_hash_matches?) end def kobold_hash_matches? -- cgit