Add rake task to check for deprecated password hashes

This commit is contained in:
Dan Rice 2014-03-30 14:59:17 -04:00
parent 64fddeaf7a
commit 1a593d9796

View file

@ -20,5 +20,15 @@ namespace :tracks do
user.errors.each_full { |msg| puts "- #{msg}\n" }
end
end
desc 'Check all passwords for deprecated hashes'
task :check_passwords => :environment do
puts "The following users have deprecated password hashes:"
User.all.each do |user|
if user.uses_deprecated_password?
puts " #{user.login}"
end
end
end
end