diff --git a/app/models/user.rb b/app/models/user.rb index 68cf79f8..1020d092 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -37,7 +37,7 @@ class User < ActiveRecord::Base before_save :trim_names after_create :signup_for_mailing_list, :if=>lambda{subscribe_to_mailing_list=='1'} after_create :create_default_favorites_list # create the default favorites list when accounts are created - after_create :inactivate_account, :if=>lambda{Revs::Application.config.require_manual_account_activation == true} + after_create :inactivate_account, :if=>lambda{Revs::Application.config.require_manual_account_activation == true && !sunet_user?} after_save :create_default_favorites_list # create the default favorites list if it doesn't exist when a user logs in validate :check_role_name diff --git a/app/views/revs_mailer/new_users_notification.erb b/app/views/revs_mailer/new_users_notification.erb index 8c1de780..7de1d92e 100644 --- a/app/views/revs_mailer/new_users_notification.erb +++ b/app/views/revs_mailer/new_users_notification.erb @@ -4,5 +4,5 @@ -

<%=@num_users%> users have registered on the Automobility Archive and require activation.

+

<%=@num_users%> users have registered on the Automobility Archive and require activation. Visit the admin interface to approve.

diff --git a/config/schedule.rb b/config/schedule.rb index f0d63e5d..92f04732 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -2,7 +2,7 @@ if ['production','staging'].include? @environment - every 5.days, :at => '1:00 am' do + every 5.days, :at => '12:00 am' do rake "blacklight:delete_old_searches[5]" end @@ -10,6 +10,15 @@ rake "revs:notify_new_registrations" end + every 1.days, :at => '2:00 am' do + rake "users:purge_unconfirmed_users" + end + + every 1.days, :at => '3:00 am' do + rake "users:purge_inactive_users" + end + + end if ['production'].include? @environment @@ -18,4 +27,4 @@ rake "-s sitemap:refresh" end -end \ No newline at end of file +end