mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX - downcase strings consistently (#10861)
ruby and postgres can treat certain characters differently when downcasing them. So do all the downcasing in ruby so that we get consistent results.
This commit is contained in:
@ -218,7 +218,7 @@ class TopicCreator
|
||||
names = usernames.split(',').flatten.map(&:downcase)
|
||||
len = 0
|
||||
|
||||
User.includes(:user_option).where('lower(username) in (?)', names).find_each do |user|
|
||||
User.includes(:user_option).where('username_lower in (?)', names).find_each do |user|
|
||||
check_can_send_permission!(topic, user)
|
||||
@added_users << user
|
||||
topic.topic_allowed_users.build(user_id: user.id)
|
||||
|
Reference in New Issue
Block a user