]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/plugins/postfixadmin_db.rb
Implement user_exists() everywhere and use it to correct the console output.
[mailshears.git] / lib / rm / plugins / postfixadmin_db.rb
index 1928202123e1b0316157f67552513ef796b325f4..ca91b8beb553f545b00f8de85c5cc475bef594fa 100644 (file)
@@ -10,6 +10,8 @@ class PostfixadminDbRm
 
 
   def delete_account(account)
+    raise NonexistentAccountError.new(account) if not user_exists(account)
+
     sql_queries = ['DELETE FROM alias WHERE address = $1;']
     # Wipe out any aliases pointed at our account.
     sql_queries << "UPDATE alias SET goto=REPLACE(goto, $1, '');"