]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/rm/plugins/agendav.rb
3 require 'common/agendav_plugin'
13 # Delete the given username and any records in other tables
15 raise NonexistentUserError
.new(user
.to_s()) if not user_exists(user
)
17 sql_queries
= ['DELETE FROM prefs WHERE username = $1;']
18 sql_queries
<< 'DELETE FROM shared WHERE user_from = $1;'
20 connection
= PGconn
.connect(@db_host, @db_port, @db_opts, @db_tty,
21 @db_name, @db_user, @db_pass)
23 sql_queries
.each
do |sql_query
|
24 connection
.query(sql_query
, [user
.to_s()])