Deleting oldusers PM.

Started by guardia, August 17, 2016, 04:34:09 AM

Previous topic - Next topic

guardia

HI,

SMF 2.0.9

I want to delete all users older than date X BUT NOT their posts.

I want to delete all users PM older than X , but exclude PM's with a certain subject (same for all of these) and/or certain users.

Anyone able to lend me a helping hand for the SQL queries?   I searched for mods as well but wasn't able to find a suitable one.

regards

guardia

Sorry.
Correction for first query.

I want to delete all users older not logged IN since X BUT NOT their posts.

Illori

admin -> forum maintenance remove all members who have not <logged in> for x days

guardia

Thank you.

And how to delete All users PM older then X but exclude certain message subjects and/or users?

Illori

that would require a database query. i really doubt many will help you with that as we dont like to give instructions that deal with PMs and the database as they should be private.

Steve

You should also patch up to 2.0.11 as there have been a number of security fixes.
DO NOT pm me for support!

Arantor

And touching PMs is complicated because for every recipient of a message there is only one master copy - person A sends person B a message, the message is shared between them (in A's sent messages and B's inbox, one message total) but if A sends a message to B, C, D and E, there is still only one message. Pruning that is a lot more complex because you don't want to remove legitimate messages.

guardia

Quote from: Steve on August 17, 2016, 08:44:01 AM
You should also patch up to 2.0.11 as there have been a number of security fixes.
Will do that soon. Thanks.

Quote from: Illori on August 17, 2016, 07:56:33 AM
that would require a database query. i really doubt many will help you with that as we dont like to give instructions that deal with PMs and the database as they should be private.

I am not sure I understand what you mean. I only want to prune all messages older then 6months and from every user.  Only the automatically sent "welcome message" with a certain subject should be excluded.
I made 100% sure my users agreed to that ;) Actually they ask for that since quite some time.


Quote from: Arantor on August 17, 2016, 12:45:24 PM
And touching PMs is complicated because for every recipient of a message there is only one master copy - person A sends person B a message, the message is shared between them (in A's sent messages and B's inbox, one message total) but if A sends a message to B, C, D and E, there is still only one message. Pruning that is a lot more complex because you don't want to remove legitimate messages.

True. But the way it works made sure there are only A -> B messages. There is no single message with multiple recipients existing.



I played a bit with sqp queries but I still cannot make it work in my testing database.

Help is very very very appreciated :)

Regards and thanks to everyone.


Arantor

Except A -> B still means both A and B have access to that same message...

Kindred

Hell, if "they are on board with that"
then why not just have THEM prune their own mailboxes?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: