We've recently had two 419 spammers/scammers register and start sending pms to tonnes of users. We usually delete rather than block spammers, but because some of their pms hadn't been read, a few users got "you have a new private message", but then nothing when they clicked on it, which confused us for a bit.
Obviously we could block them instead, but we don't like them taking up space in the user table, so would it be easy enough to unset that message if a sender is deleted?
Comments
Comment #1
mindless commentedfunction privatemsg_user doesn't seem to have a case 'delete'. if you're able to provide a patch, please do. otherwise, would you be able to test changes if made available?
Comment #2
catchI could have a look at doing a patch, might take a little while to get to it.
And yeah we should be able to test.
Comment #3
abramo commentedsubscribing - delete should be made available, as essential.
Comment #4
mindless commentedcode added. please test next 5.x dev snapshot.
Comment #5
catchHi, I just tried this, but still get the alert.
Here's steps to reproduce:
1. create new user
2. send private message to your own account from that user
3. delete the new user before you read the message
I still get a "you have one new private message" alert with the latest dev version - i.e. there's the notification, but then when I go to my inbox there's no message.
Comment #6
catchAlright, looking at the code now, must be here:
or here:
Comment #7
mindless commentedWith the new code (verify you have 1.70.2.29 at the top of your privatemsg.module file) you should still see that you have a new message, but you should be able to see it. The message should be from "anonymous". This is consistent with how other modules handle deleting a user... content that can be viewed by other users remains, but is now owned by the anonymous user. I did make it actually delete any private messages that were sent TO to the deleted user.
So, the question is why you couldn't see the new message.. is the guest user marked as "blocked" in your drupal?
Comment #8
catchahhh it's .28! Maybe the tarbal didn't update yet. Will try again later on tonight or some time tomorrow.
Marking back to fixed assuming that's the only problem. Thanks!
Comment #9
catchJust a note to say with latest development snapshot (verified), I now get the message sent from anonymous after the user's been deleted, which is great!
I'm still getting an alert for the deleted message prior to that upgrade, but will try find where it is in the database and reset it manually, that's not a problem.
Thanks very, very much for sorting that out. We've not had another 419er register since I originally posted but this issue was going to be painful.
Comment #10
(not verified) commented