]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/plugins/roundcube.rb
Replace 'account' with 'user' everywhere.
[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 users will be pruned anyway.
15 return []
16 end
17
18
19 def get_leftover_users(db_users)
20 # Get a list of all users who have logged in to Roundcube.
21 rc_users = self.list_users()
22 return rc_users - db_users
23 end
24
25 end