trabajo-afectivo/db/migrate/20211028072158_maintenance_remove_active_ldap_sessions.rb

13 lines
385 B
Ruby
Raw Permalink Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
class MaintenanceRemoveActiveLdapSessions < ActiveRecord::Migration[6.0]
def change
return if !Setting.exists?(name: 'system_init_done')
# Only relevant for when ldap integration is used.
return if !Setting.get('ldap_integration')
ActiveRecord::SessionStore::Session.destroy_all
end
end