mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
f0a122a66c
introduce new setting email_always, that will force emails to send to users regardless of presence on site
20 lines
492 B
Ruby
20 lines
492 B
Ruby
require_dependency 'admin_user_index_query'
|
|
|
|
module Jobs
|
|
|
|
class PendingUsersReminder < Jobs::Scheduled
|
|
|
|
recurrence { daily.hour_of_day(9) }
|
|
|
|
def execute(args)
|
|
if SiteSetting.must_approve_users
|
|
count = AdminUserIndexQuery.new({query: 'pending'}).find_users_query.count
|
|
if count > 0
|
|
GroupMessage.create(Group[:moderators].name, :pending_users_reminder, {limit_once_per: false, message_params: {count: count}})
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|