user.rb 440 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SystemReport::Plugin::Entities::User < SystemReport::Plugin
  3. DESCRIPTION = __('Customer and agent ratio (role based user counts)').freeze
  4. def fetch
  5. {
  6. 'Agents' => User.with_permissions('ticket.agent').count,
  7. 'Customer' => User.with_permissions('ticket.customer').count,
  8. 'LastLogin' => User.maximum(:last_login),
  9. }
  10. end
  11. end