View Full Version : problem with PM notifications
ravenscape
02-03-2011, 03:51 PM
So, I had a member send a bunch of other members a PM with private, personally identifying information re another member. After banning the perp, I deleted the PMs via mysql query.
Now the affected members have a ghost unread PM notification. I reset the unread pm count to zero, but now the count doesn't decrement correctly when they read a new PM.
Any ideas on how to fix this?
ravenscape
02-12-2011, 04:40 AM
* crickets *
Do you remember exactly what you did to delete the messages via mysql query (and how did you reset the unread count?).
It looks to me as if the total and unread pm counters get recalculated after some functions (the messages are actually counted, not just inc or dec the counters). So while I don't see any specific "fix pm counters" admin function, it looks like if a user does "mark all read" or "delete" from the pm page the counters should be fixed.
If you really wanted to you could probably write a script to fix everyone's counters using the code from build_pm_counters() in private.php.
ravenscape
02-12-2011, 03:08 PM
thanks for the suggestions, kh99!
To find and delete the PMs I did the following:
Using phpMyAdmin:
SELECT *
FROM `pmtext`
WHERE `fromusername` = "name"
LIMIT 120 , 30
I then used the checkbox in the results list to pick the offending PMs and delete them.
To change the PM count, I also used phpMyAdmin to bring up each user's profile info and edit the count number.
"mark all read" did not fix the problem. It appears to work only page-by-page, not globally, and there is no page with an unread PM.
Having the affected members delete all their PMs might do the trick, though it's potentially an inconvenience for them if they have PMs they'd like to keep.
If you really wanted to you could probably write a script to fix everyone's counters using the code from build_pm_counters() in private.php.
I'll check this out. Thanks!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.