]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/mailshears/plugins/agendav.rb
Factor out common code that can be used to mv (rename) accounts.
[mailshears.git] / lib / mailshears / plugins / agendav.rb
index 3dec9260a0a95dee437c6043c44cfb1e92016760..35783022564121555c8b55a098bb31e3366bfe9d 100644 (file)
@@ -1,8 +1,12 @@
 require 'pg'
 
+require 'common/plugin'
+require 'mailshears/rm_plugin'
+
 class AgendavDb
 
   include Plugin
+  include RmPlugin
 
   def initialize()
     cfg = Configuration.new()
@@ -37,8 +41,8 @@ class AgendavDb
     # Delete the given username and any records in other tables
     # belonging to it.
 
-    sql_queries = ['DELETE FROM prefs WHERE username = $1::int;']
-    sql_queries << 'DELETE FROM shared WHERE user_from = $1::int;'
+    sql_queries = ['DELETE FROM prefs WHERE username = $1;']
+    sql_queries << 'DELETE FROM shared WHERE user_from = $1;'
 
     begin
       connection = PGconn.connect(@db_host,