client_management/lib/tasks/client_management_tasks.rake

9 lines
258 B
Ruby

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