Skip to content

Commit

Permalink
fix: Unscope users to encompass default scoping by privacy module (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinaeftekhar authored Nov 16, 2023
1 parent 3d756ba commit a57304e
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:)
send_warning(Decidim::User.unscoped.where(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:)
delete_user_and_send_email(Decidim::User.unscoped.where(organization:)
.not_deleted
.where.not(email: "")
.where("warning_date < ?", delete_inactive_before_date(organization)))
Expand Down

0 comments on commit a57304e

Please sign in to comment.