Commit b167f8c7 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Delete offline messages when deleting account. JM-1352. Thanks to Daryl Herzmann

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10709 b35dd754-fafc-0310-a699-88a17e54d16e
parent 222e6a59
......@@ -53,6 +53,8 @@ public class DefaultUserProvider implements UserProvider {
"DELETE FROM ofUserProp WHERE username=?";
private static final String DELETE_USER =
"DELETE FROM ofUser WHERE username=?";
private static final String DELETE_USER_OFFLINE =
"DELETE FROM ofOffline WHERE username=?";
private static final String UPDATE_NAME =
"UPDATE ofUser SET name=? WHERE username=?";
private static final String UPDATE_EMAIL =
......@@ -185,6 +187,11 @@ public class DefaultUserProvider implements UserProvider {
pstmt.setString(1, username);
pstmt.execute();
pstmt.close();
// Delete all of the user's offline messages
pstmt = con.prepareStatement(DELETE_USER_OFFLINE);
pstmt.setString(1, username);
pstmt.execute();
pstmt.close();
// Delete the actual user entry
pstmt = con.prepareStatement(DELETE_USER);
pstmt.setString(1, username);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment