Deleting Private Messages

When a user is removed from the database, we clean up the private messages the user sent and received

= Received PMs =

3.0
Links of user to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

Desired
Links of user to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

PMs received in No Box
User received the PM, but the PM is only moved to the inbox (or hold, if inbox is full) when the user visits the inbox.

3.0
Links of user to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

Desired
Links of user to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

= Sent PMs =

3.0
Links of sender to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

Desired
Links of sender to PMs are deleted, if there is no further entry in the privmsgs_to table, the pm itself is also deleted.

3.0
Links of sender and receivers to PMs are deleted and the entry in the privmsgs_to table is also deleted.

Desired
Links of sender and receivers to PMs are deleted and the entry in the privmsgs_to table is also deleted.

= Sent PMs to multiple Users =

Same Box
If the PMs are all in the same box for all users, the desired and current behaviour is the same as in Sent PMs

3.0
If there is one user, that has the PM in "No Box", the links of sender and "No Box"-receivers to PMs are deleted and the entry in the privmsgs_to table is also deleted. This also applies if another user already read the message, which is considered a bug.

3.0.11 / Desired
Links of sender to PMs are deleted, everything else is kept.