20211028072158_maintenance_remove_active_ldap_sessions.rb 386 B

123456789101112
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class MaintenanceRemoveActiveLdapSessions < ActiveRecord::Migration[6.0]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. # Only relevant for when ldap integration is used.
  6. return if !Setting.get('ldap_integration')
  7. ActiveRecord::SessionStore::Session.destroy_all
  8. end
  9. end