Replace 'account' with 'user' everywhere.
[mailshears.git] / lib / prune / prune_runner.rb
index 74455d6b2ba8903655ce385b8e4c16d81ad4ccf6..7ea61919ca46981c4284c4744854355756f9e3be 100644 (file)
@@ -10,17 +10,18 @@ class PruneRunner
     # We don't want to check the PostfixAdmin database against itself.
     return if plugin.class == PostfixadminPrune
 
-    pfa = PostfixadminPrune.new()
+    cfg = Configuration.new()
+    pfa = PostfixadminPrune.new(cfg)
 
     db_users = pfa.list_users()
     db_domains = pfa.list_domains()
 
-    leftover_users = plugin.get_leftover_accounts(db_users)
+    leftover_users = plugin.get_leftover_users(db_users)
     leftover_domains = plugin.get_leftover_domains(db_domains)
 
     leftover_users.each do |user|
-      user_description = plugin.describe_account(user)
-      plugin.delete_account(user)
+      user_description = plugin.describe_users(user)
+      plugin.delete_user(user)
       report(plugin, "Removed user: #{user} (#{user_description})")
     end