Fixed number count of "followers" and "following" wrong when users deleted

erich37

Well-known member
I have hard-deleted a few users who were spammers and scammers.

So now the number-count which shows up on some members who were following those members which I deleted, are now counting wrong.

Please make the number-count on "following / followers" to update to show the correct numbers when users are deleted.
XF-version 1.0.4

following_followers_count_wrong.webp
 
I think in userdw::postDelete this 2 queries are missing:

PHP:
$db->delete('xf_user_follow', "follow_user_id = $userIdQuoted");
        $db->delete('xf_user_follow', "user_id = $userIdQuoted");
 
Fixed now. It's more than just those 2 queries - there's consideration for the de-normalized value, which can now be rebuilt on profile view.
 
Mike and Kier would you please mention in your fixed posts. What version is it fixed in (beta 5, beta 3, next version, soon ...) just to make it clear for us.
thank you
 
Fixes will always be available in the next release (of 1.1) based on the time of the posting, unless otherwise specified.
 
Top Bottom