about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-06-20 02:52:34 +0200
committerGitHub <noreply@github.com>2019-06-20 02:52:34 +0200
commit7696f77245c2302787d239da50248385b3292a5e (patch)
tree81db43f660c382679cc7a834d0be06c0218592a8 /app/models/user.rb
parent33144e132d28f5b820ae12e4b8e4fb34ca47b1d6 (diff)
Add moderation API (#9387)
Fix #8580
Fix #7143
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 4abf124fc..50873dd01 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -87,6 +87,7 @@ class User < ApplicationRecord
   scope :approved, -> { where(approved: true) }
   scope :confirmed, -> { where.not(confirmed_at: nil) }
   scope :enabled, -> { where(disabled: false) }
+  scope :disabled, -> { where(disabled: true) }
   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(accounts: { suspended_at: nil }) }
   scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }