mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
FIX: don't send activation reminder to staged users
This commit is contained in:
parent
5d99346740
commit
ab79060468
@ -4,8 +4,8 @@ module Jobs
|
||||
|
||||
def execute(args)
|
||||
User.joins("LEFT JOIN user_custom_fields ON users.id = user_id AND user_custom_fields.name = 'activation_reminder'")
|
||||
.where(active: false, user_custom_fields: { value: nil })
|
||||
.where('users.created_at < ?', 2.days.ago)
|
||||
.where(active: false, staged: false, user_custom_fields: { value: nil })
|
||||
.where('users.created_at BETWEEN ? AND ?', 3.days.ago, 2.days.ago)
|
||||
.find_each do |user|
|
||||
|
||||
user.custom_fields['activation_reminder'] = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user