diff options
author | James Lopez <james@jameslopez.es> | 2017-04-19 12:11:04 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-04-19 12:11:04 +0200 |
commit | 4190146110f133a693c7f38e1da21c41e77f0fa5 (patch) | |
tree | 80914406ca7c8a31f9a38379701e0fc12201b2bf /app/models/user.rb | |
parent | bbd83376d625b8d9cb73cbc83c3c0eb71b1abf32 (diff) | |
download | gitlab-ce-4190146110f133a693c7f38e1da21c41e77f0fa5.tar.gz |
Fix active user count
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 457ba05fb04..2d85bf8df26 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -197,7 +197,7 @@ class User < ActiveRecord::Base scope :admins, -> { where(admin: true) } scope :blocked, -> { with_states(:blocked, :ldap_blocked) } scope :external, -> { where(external: true) } - scope :active, -> { with_state(:active) } + scope :active, -> { with_state(:active).non_internal } scope :not_in_project, ->(project) { project.users.present? ? where("id not in (:ids)", ids: project.users.map(&:id) ) : all } scope :without_projects, -> { where('id NOT IN (SELECT DISTINCT(user_id) FROM members WHERE user_id IS NOT NULL AND requested_at IS NULL)') } scope :todo_authors, ->(user_id, state) { where(id: Todo.where(user_id: user_id, state: state).select(:author_id)) } |