]> 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 1366bd6db69a15452a0b777dd3b131e65b90d54a..2b2952f01a9254e01331b7a663d632762b8eb0ea 100644 (file)
@@ -12,6 +12,7 @@ class AgendavRm
   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;'