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

As Designed Deleted user problem (Likes You've Received)

Discussion in 'Resolved Bug Reports' started by Eagle, Apr 15, 2014.

  1. Eagle

    Eagle Well-Known Member

    This still runs after a user is deleted in Likes You've Received Page. I'm not sure it's just a bug or as designed however when go to see liked my message, username showing but in Likes You've Received page no. It is showing "Unknown Member". If user is deleted, then his/her have to remove in Lines You've Received page too.

  2. Nobita.Kun

    Nobita.Kun Well-Known Member

    I think its normal. Because when you delete user XF didn't remove any data from user ;-)
    Its happen with content_type: post, profile_post,... :)
  3. Eagle

    Eagle Well-Known Member

    Yes that is correct however deleted users removed from likes list in messages. It should be remove from Likes You've Received page. Because this is like. It's not post or profile post. If user is deleted then his/her all likes should be remove from everywhere. But it's just only for likes. It's not post or profile post/comments etc.
    Last edited: Apr 15, 2014
  4. Mike

    Mike XenForo Developer Staff Member

    The likes are still counted, so this is as designed.
    Nobita.Kun likes this.
  5. Eagle

    Eagle Well-Known Member

    The likes are still counted but removed from members who liked message.

  6. Eagle

    Eagle Well-Known Member

    I have fixed this now.

    Step 1:
    First backup and run these SQL Query;

    FROM xf_liked_content
    WHERE like_user_id = 0;
    FROM xf_liked_content
    WHERE content_user_id = 0;
    UPDATE xf_user AS u
    SET like_count = (
        SELECT COUNT(*)
        FROM xf_liked_content AS lc
        WHERE lc.content_user_id = u.user_id
        GROUP BY lc.content_user_id

    PS thanks to @Jake Bunce


    Now all "unknown member" likes removed from Likes You've Received Page, posts, content, etc.

    Step 2:
    Now use this file after running SQL Queries:


    All deleted user likes has been removed from the Database.

    Note that I hate when delete a user. I would recommend that you never delete user.
    rafass likes this.

Share This Page