about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-06-19 16:19:32 +0200
committerThibaut Girka <thib@sitedethib.com>2019-06-19 18:36:16 +0200
commit356e9150dfec5bbb8a56b128c1d3372cd5731ec6 (patch)
treeb5270b3fe3c38ef2d94670f06613c4bdf71d0631 /app/models/user.rb
parentf4b008906dcfc3333ec533884aa10b65f8ae41a2 (diff)
parentede0be5dba6836606db772a007ad9be5d60c7b99 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/lib/sanitize_config.rb
  Keep our version, we support the tags upstream transforms.
- package.json
- yarn.lock
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index c24741ff1..fcfb79612 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -88,7 +88,7 @@ class User < ApplicationRecord
   scope :confirmed, -> { where.not(confirmed_at: nil) }
   scope :enabled, -> { where(disabled: false) }
   scope :inactive, -> { where(arel_table[:current_sign_in_at].lt(ACTIVE_DURATION.ago)) }
-  scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where.not(accounts: { suspended_at: nil }) }
+  scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where(accounts: { suspended_at: nil }) }
   scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }
   scope :emailable, -> { confirmed.enabled.joins(:account).merge(Account.searchable) }