Userservice plugin leaves user roster items in DB when user is deleted
Description
Quoute form igniterealtime "I am removing account it is not really removing rosters from that account. Later, when I will add account with same name it has already rosters in his roster list (same as before deleting account)."
Environment
None
Activity
Show:
Dele Olajide December 15, 2013 at 5:53 PM
Edited
This works better
public void deleteUser(String username) throws UserNotFoundException, SharedGroupException { User user = getUser(username); userManager.deleteUser(user);
This is the change I am making. To iterate the roster of the user and delete all roster items before deleting the actual user and thereby ensuring DB referential integrity.
public void deleteUser(String username) throws UserNotFoundException, SharedGroupException { Roster r = rosterManager.getRoster(username);
Quoute form igniterealtime
"I am removing account it is not really removing rosters from that account. Later, when I will add account with same name it has already rosters in his roster list (same as before deleting account)."