Created
April 4, 2014 18:07
-
-
Save ruprict/9979987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def report_bad_accounts | |
no_bad = 0 | |
CSV.foreach('play_accounts.csv', headers: true) do |row| | |
acc = Account.where(email: row['email']).first | |
puts "Account not found for #{row['email']}" && next unless acc | |
unless acc.kyck_id.to_s == row['kyck_id'] | |
no_bad += 1 | |
puts "KYCK IDs don't match for #{row['email']}" | |
puts "Auth KYCK ID=#{acc.kyck_id.to_s} / Play KYCK ID=#{row['kyck_id']}" | |
end | |
end | |
puts "Number of bad accounts: #{no_bad}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment