It's likely an outlier case but I had cases where decrementing post counts ended up in some users having negative post counts. I won't get into the hows and whys that might happen but I figured simply adding a floor to the post count when doing decrements provides some peace of mind. It's likely that our problem is related to our use of the moderate bit for the node table (we have moderated classified ads). See patch.

CommentFileSizeAuthor
user_stats.module.patch799 bytesjaydub

Comments

liam mcdermott’s picture

Status: Needs review » Fixed

Good idea! Committed. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.