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

XF 1.2 Merging Users - What happens to likes & points?

Discussion in 'XenForo Questions and Support' started by TheBigK, Aug 15, 2013.

  1. TheBigK

    TheBigK Well-Known Member

    If I merge user A with user B, user 'B' gets all the content of user A and user 'A' is then deleted. I want to know what happens to the likes received by user 'A'? Are they transferred as well?
  2. Mike

    Mike XenForo Developer Staff Member


    To clarify, the likes are brought across, though it doesn't seem like the count is updated. This is actually rather challenging to do.
    Last edited: Aug 15, 2013
  3. TheBigK

    TheBigK Well-Known Member

    Thanks, Mike. Is there any work-around for the likes to reflect in the target account? I think the target account should show the likes received by old account, plus the likes received by the new account before the merged happens.

    On our site, we imported users and posts from WordPress - and some of the members had several hundred posts. So after the import, they had two IDs - one from WordPress and One from XenForo. Now we want to merge these users but they'd certainly be interested in retaining their likes count.
  4. Chi Bearhawks

    Chi Bearhawks Member

    I would imagine that you could manually update the database in phpmyadmin to reflect the new total, and then Xenforo should automatically keep the proper count going from there. I'm not 100% on that though.
  5. HWS

    HWS Well-Known Member

    This is very problematic, because both users may have liked the same posts, which should result in only 1 like count even after the merge. If you count 2 for the merged user, it would be unfair for all other users.
  6. Mike

    Mike XenForo Developer Staff Member

    You can manually edit the like count for the user in question after merging.

    HWS is correct in identifying how nightmarish this potentially is - we don't handle all of these cases.
  7. TheBigK

    TheBigK Well-Known Member

    Alright, since we have a very limited number of users who will need to be merged - we can manually edit the number of likes.

    I think the points will be automatically counted if I manually set the likes count. Is that correct?
  8. Mike

    Mike XenForo Developer Staff Member

    Points don't get changed. In general, that would lead to duplication of trophies. The next time the trophy cron runs, it would potentially catch them.

    I should note that I have made some small tweaks to this in 1.2.1.
    Brent W and JulianD like this.
  9. TheBigK

    TheBigK Well-Known Member

    I think the best strategy here is to let the users have the post/like count of the new ID.

Share This Page