Skip to content

Commit

Permalink
Improve docstring for inactive_users
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Jun 17, 2024
1 parent 2504169 commit 05555c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/user_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class UserCleaner

# Returns all users who have been inactive for INACTIVE_USER_THRESHOLD months,
# i.e. their last sign-in date is more than INACTIVE_USER_THRESHOLD months ago.
#
# Users without a last_sign_in_at date are also considered inactive. This is
# the case for users who have never logged in since PR #553 was merged.
def inactive_users
User.where("last_sign_in_at < ?", INACTIVE_USER_THRESHOLD.ago)
.or(User.where(last_sign_in_at: nil))
Expand Down

0 comments on commit 05555c2

Please sign in to comment.