It still sort of puzzles my why Openfire does not clean up the database when a user is deleted. Stale information is left all over the place (jiveoffline, mucaffiliation, mucmember, etc).
JM-510 noted this problem back in the day and was closed, but the issue remains.
So I created Jira tickets with patches for comment :
JM-1352 fix ofoffline
JM-1136 fix for mucaffiliation
Still waiting for somebody more powerful than I to commit or suggest patch problems…