Skip to content

Commit

Permalink
backport: Unscope users in clean inactive users job #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Nov 24, 2023
1 parent e5cdcb5 commit b4cfb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/jobs/decidim/cleaner/clean_inactive_users_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ def perform
Decidim::Organization.find_each do |organization|
next unless organization.delete_inactive_users?

send_warning(Decidim::User.where(organization: organization)
send_warning(Decidim::User.unscoped.where(organization: organization)
.not_deleted
.where.not(email: "")
.where("current_sign_in_at < ?", email_inactive_before_date(organization)))
delete_user_and_send_email(Decidim::User.where(organization: organization)
delete_user_and_send_email(Decidim::User.unscoped.where(organization: organization)
.not_deleted
.where.not(email: "")
.where("warning_date < ?", delete_inactive_before_date(organization)))
Expand Down

0 comments on commit b4cfb70

Please sign in to comment.