Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: bug: buddy_manage.php - deleted users showing as ghost buddies  (Read 4971 times)

0 Members and 1 Guest are viewing this topic.

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
bug: buddy_manage.php - deleted users showing as ghost buddies
« on: September 24, 2008, 12:18:40 pm »

Hi Stramm... others...

I have a lot of deleted users on my gallery. This means that there are some users who were "buddies" with others, but are now deleted.
In buddy_manage.php it shows up no username, just the text "offline" for where these users used to be.

I'm not sure if this bug has been addressed, but it should be a matter of changing a CPG db query somewhere to check if a user exists before returning a buddy result. (and potentially the delete user file should be updated for this mod)

Thanks in advance for any help on what to change to correct this
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bug: buddy_manage.php - deleted users showing as ghost buddies
« Reply #1 on: September 24, 2008, 02:00:50 pm »

hmm.. yes, the buddy table needs an update when a user gets deleted.

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: bug: buddy_manage.php - deleted users showing as ghost buddies
« Reply #2 on: September 24, 2008, 03:26:17 pm »

Thanks for the quick response...

in the mean time, can you think of which queries I should look toward modifying so that buddies only get called up if they're existing users?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bug: buddy_manage.php - deleted users showing as ghost buddies
« Reply #3 on: September 24, 2008, 03:41:03 pm »

That's not the way I'm going to fix it. To clean the buddy table you either nedd to check each entry manually or write a lil script that'll do that for you.

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: bug: buddy_manage.php - deleted users showing as ghost buddies
« Reply #4 on: September 25, 2008, 04:54:10 am »

ok... I might do a hacky edit on the delete user file, and do what you say.. write a script to clean the buddy list..

Cheers for the advice :)
Logged

bitcloud

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: bug: buddy_manage.php - deleted users showing as ghost buddies
« Reply #5 on: September 26, 2008, 12:46:34 am »

Strangely enough I found these lines:

//Delete Notifications
//Cleanup buddy tables

In delete.php. Not sure if they are your mods or mine (probably yours)
I can't duplicate the orphaned buddy entries when deleting anymore, so I'm not sure how all these orphaned/deleted buddies came about.

Anyway, to clean up the buddy table (if anyone else experiences this), I plugged this into phpmyadmin:
Code: [Select]
DELETE FROM `cpg1410_buddy` where user_id not in (select user_id from `cpg1410_users`)
and:

Code: [Select]
DELETE FROM `cpg1410_buddy` where buddy_id not in (select user_id from `cpg1410_users`)(replacing cpg1410 with whatever your version)
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.