We recently configured the integration with LDAP, unfortunately we did not use group filtering during the first synchronization, now we have several hundred inactive customers. Is it possible to delete all inative customers at once?
Warning: The following is a -very- destructive operation that can delete productive data.
Only run below command if you’re double sure on what you’re doing.
Remove allllll the inactive users
Do NOT change below command.
User.where(active: false).each {|user|
next if user.id == 1
user.destroy
}