]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/plugins/agendav.rb
Implement user_exists() everywhere and use it to correct the console output.
[mailshears.git] / lib / rm / plugins / agendav.rb
index 6aa6d9191216d59f635238836bfe7e05ad68d49e..2b2952f01a9254e01331b7a663d632762b8eb0ea 100644 (file)
@@ -9,13 +9,10 @@ class AgendavRm
   include RmPlugin
 
 
-  def delete_domain(domain)
-    # AgenDAV doesn't have a concept of domains.
-  end
-
   def delete_account(account)
     # Delete the given username and any records in other tables
     # belonging to it.
+    raise NonexistentAccountError.new(account) if not user_exists(account)
 
     sql_queries = ['DELETE FROM prefs WHERE username = $1;']
     sql_queries << 'DELETE FROM shared WHERE user_from = $1;'
@@ -42,14 +39,4 @@ class AgendavRm
 
   end
 
-
-  def get_domain_usernames(domain)
-    usernames = get_agendav_usernames();
-    matches = usernames.select do |username|
-      username =~ /@#{domain}$/
-    end
-
-    return matches
-  end
-
 end