Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 8293:34814a908557
mod_storage_sql: Also clear the prosodyarchive table when an user is deleted (fixes #1009)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 05 Oct 2017 17:44:47 +0200 |
| parent | 8292:2fc8b83dd736 |
| child | 8294:90576b60f2d0 |
| child | 8409:e98b4352d7df |
comparison
equal
deleted
inserted
replaced
| 8292:2fc8b83dd736 | 8293:34814a908557 |
|---|---|
| 414 end | 414 end |
| 415 | 415 |
| 416 function driver:purge(username) | 416 function driver:purge(username) |
| 417 return engine:transaction(function() | 417 return engine:transaction(function() |
| 418 engine:delete("DELETE FROM \"prosody\" WHERE \"host\"=? AND \"user\"=?", host, username); | 418 engine:delete("DELETE FROM \"prosody\" WHERE \"host\"=? AND \"user\"=?", host, username); |
| 419 engine:delete("DELETE FROM \"prosodyarchive\" WHERE \"host\"=? AND \"user\"=?", host, username); | |
| 419 end); | 420 end); |
| 420 end | 421 end |
| 421 | 422 |
| 422 --- Initialization | 423 --- Initialization |
| 423 | 424 |