1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Recalculate user stats?

Discussion in 'XenForo Questions and Support' started by Kevin, Aug 12, 2011.

  1. Kevin

    Kevin Well-Known Member

    Any way of recalculating user stats, in particular the number of items posted? Can't find an option for it.

    Background = Imported users from a vB database but not the posts; users came over with their stats already set. I want to reset their stats based upon current threads/posts in XF.
  2. James

    James Well-Known Member

    They should reset with the cron jobs IIRC.
  3. Kevin

    Kevin Well-Known Member

    That'd be the site stats, not wiping out all of the users stats & recalculating them. :coffee:
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If you only imported the users then their post counts should all be 0. You can do this with a database query:

    UPDATE xf_user
    SET message_count = 0;
    You may wish to manually exclude some users from the reset (those users who were not imported who have posts):

    UPDATE xf_user
    SET message_count = 0
    WHERE user_id NOT IN (1,2,3,4);
    If you want to actually recalculate post counts for all users then it's a little more involved. See this thread:

  5. Kevin

    Kevin Well-Known Member

    Ever hear the phrase "Sometimes smart people do dumb things."? Yeah, we'll just leave it at that I wasn't thinking fully on some of the imports. :oops:

    Thanks, I missed that one. Looks like I'll be doing a manual update. :(

Share This Page