1ad8cdb786b989c3c86d9be1b868a9f4e85c4992
[mailshears.git] / lib / prune / plugins / roundcube.rb
1 require 'pg'
2
3 require 'prune/prune_plugin'
4 require 'rm/plugins/roundcube'
5
6 class RoundcubePrune < RoundcubeRm
7
8 include PrunePlugin
9
10
11 def get_leftover_domains(db_domains)
12 # Roundcube doesn't have a concept of domains. We could parse the
13 # usernames to see what domains are present, but the point is
14 # moot: all leftover accounts will be pruned anyway.
15 return []
16 end
17
18
19 def get_leftover_accounts(db_accounts)
20 # Get a list of all users who have logged in to Roundcube.
21 rc_accounts = self.list_users()
22 return rc_accounts - db_accounts
23 end
24
25 end