Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10605

Orpahned privmsgs are left in the prvmsgs table, with no ties in privmsgs_to table

    XMLWordPrintable

Details

    Description

      Some private messages remain in privmsgs table, even though they have no ties in privmsgs_to anymore. For example my board reports 2,033 results with
      SELECT `msg_id` FROM `phpbb_privmsgs` WHERE `msg_id` NOT IN (SELECT `msg_id` FROM `phpbb_privmsgs_to`)

      All those messages are not accessible through any users UCP. I is not clear how it happened. As posted in the Support Forum under
      http://www.phpbb.com/community/viewtopic.php?f=46&t=2108416#p12886345
      such can happen, if a message from a deleted user is deleted. But this isn't necessarily the only way this can happen.

      It isn't clear how this messages slipped through the deletion process. It seems however, that user_delete() from /includes/function_user.php might be responsible. It seems to delete messages from privmsgs that the deleted user send but that haven't been read by the recipient. However it is unclear if this includes unread messages that the recipient moved to other folders automatically via rules.

      Also all privmsgs_to links to the user as recipient are deleted, but it seems it isn't checked whether or not this was the last link for that message (if the recipient(s) already deleted the messages).

      Attachments

        Issue Links

          Activity

            People

              nickvergessen Joas Schilling
              heinrich_k heinrich_k [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: