mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: error during signup saying "Password is the same as your current password" due to automatic group membership granting a trust level
This commit is contained in:
@@ -370,6 +370,11 @@ class Group < ActiveRecord::Base
|
||||
self.where("string_to_array(incoming_email, '|') @> ARRAY[?]", Email.downcase(email)).first
|
||||
end
|
||||
|
||||
def self.grants_by_email_domain
|
||||
Group.where(automatic: false)
|
||||
.where("LENGTH(COALESCE(automatic_membership_email_domains, '')) > 0")
|
||||
end
|
||||
|
||||
def bulk_add(user_ids)
|
||||
if user_ids.present?
|
||||
Group.exec_sql("INSERT INTO group_users
|
||||
|
||||
Reference in New Issue
Block a user