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

As designed deleted user / Likes still appear

erich37

Well-known member
#1
I just deleted a certain user, but the "Likes" from this user are still showing up in the system.

Did rebuild caches but the "Likes" of this user do not disappear.
 

Kier

XenForo Developer
Staff member
#2
I just deleted a certain user, but the "Likes" from this user are still showing up in the system.

Did rebuild caches but the "Likes" of this user do not disappear.
This is most likely because it is content that is liked, not users. Therefore, deleting a user will have no effect upon the content they have posted and whether or not people liked it. As such, it is working as designed.
 

erich37

Well-known member
#4
well, I deleted this user because he was a spammer. But he still liked a few posts.
So I have the name of this person showing up at my website in form of "Likes", but in fact this user does not exist at my website anymore.

Does not make sense to show the name of that user within the "Likes".
Imagine the username of this user is some strange name and he likes many posts. Then you figure you mark him as a spammer or quickly delete the user from your system.
You will still have this username appearing..........
 

erich37

Well-known member
#5
so as said, I have deleted a user from my system which actually liked a Forum-post.
Now another person (her name is Claudia) "liked" the same post.

Now the name of the specific user which I deleted is not appearing anymore (no idea why). Which is actually great, but it looks a bit strange as the word "and" is still showing up.

Please see the screenshot below:

bug_deleted_user_like.png
 

dutchbb

Well-known member
#6
Imagine the username of this user is some strange name and he likes many posts. Then you figure you mark him as a spammer or quickly delete the user from your system.
You will still have this username appearing..........
Yes, this is especially a problem if the username is very disturbing. Not likely to happen often maybe, but you would like to be able to delete it.
 

mauzao9

Well-known member
#11
I Hate this, we can't even by the Spam Cleaner delete the user likes!
Aren't the user likes, user content too? Soo why isn't that possible? o_O
 

BamBam

Active member
#12
Hey,

Ahh, is there still no Fix? I have many deleted Users, but the likes are there. Sometimes the Username is there (but the User is deleted), and sometimes there is only: deleted User .
 

rellek

Well-known member
#13
Try those SQL queries in phpMyAdmin (don't forget to create a backup!)
Code:
DELETE FROM xf_liked_content WHERE like_user_id NOT IN (SELECT user_id FROM xf_user);
UPDATE xf_user AS u SET like_count = (SELECT COUNT(lc.like_id) FROM xf_liked_content AS lc WHERE lc.content_user_id = u.user_id GROUP BY lc.content_user_id);
And then this script:
http://xenforo.com/community/thread...t-profile-post-like-caches.42384/#post-457352