say"Multiple users registered with e-mail address #{ref_user.email}.",:yellow
say"e-mail will be disabled for the following accounts: #{user.map(&:account).map(&:acct).join(', ')}",:yellow
say"e-mail will be disabled for the following accounts: #{user.map{|user|user.account.acct}.join(', ')}",:yellow
say'Please reach out to them and set another address with `tootctl account modify` or delete them.',:yellow
users.each_with_indexdo|user,index|
@ -253,7 +253,7 @@ module Mastodon::CLI
defdeduplicate_users_process_confirmation_token
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE confirmation_token IS NOT NULL GROUP BY confirmation_token HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE remember_token IS NOT NULL GROUP BY remember_token HAVING count(*) > 1").eachdo|row|
say"Unsetting remember token for those accounts: #{users.map(&:account).map(&:acct).join(', ')}",:yellow
say"Unsetting remember token for those accounts: #{users.map{|user|user.account.acct}.join(', ')}",:yellow
users.eachdo|user|
user.update!(remember_token:nil)
@ -277,7 +277,7 @@ module Mastodon::CLI
defdeduplicate_users_process_password_token
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE reset_password_token IS NOT NULL GROUP BY reset_password_token HAVING count(*) > 1").eachdo|row|