client_management/lib/tasks/client_management_tasks.rake

9 lines
258 B
Ruby
Raw Normal View History

2017-03-07 09:37:28 +00:00
desc "Making accounts"
task :client_management,[:arg] => :environment do |task,args|
emails = RegisteredSite.all.pluck(:admin_email)
emails.uniq!
emails.each do |email|
CPanelUser.create(:email => email, :password => SecureRandom.hex(5))
end
end