View Full Version : Delete all photos from userids which do not exist anymore
March 11th, 2008, 10:02 AM
Hi Photopost Team,
I deleted several users from my vB Installation and now the gallery pictures of those users don't have an owner anymore.
Changing this one by one is to much work so I am searching for a way to delete all pictures and comments from the pp db from userid's which do not exist in the vb user table anymore.
How can I do this?
March 11th, 2008, 10:31 AM
Are userid's still associated with the photos? If so you can view the photopost profile and select delete all users photos.
March 12th, 2008, 02:54 AM
I am using vB 3.7 beta 5 and it seems that the deletion function works different there cause the photo's now belong to nobody.
So what I need is an option for pp to check if a photo exist without a userid or with a userid that does not exist in vb anymore and delete the picture
March 12th, 2008, 08:56 AM
well I doubt there is such a feature and using vb beta would not cause this. You would have needed to run the scan database feature realign username on photos comments to cause this. I do not beleive you can delete photos in bulk belonging to no userid so your only way to do this would be to issue some query in mysql like so to some bogus userid
UPDATE pp_photos SET userid=9999 WHERE userid=0
You could then go to the userid 9999 profile and use the delete all photos function
March 12th, 2008, 10:37 AM
Hi Chuck, thanks for the fast feedback. I will play around with this.
btw. it sounds like a good Feature request for one of the next versions.
PP Admin Panel should contain a Maintenance option checking for pictures which belong to a non existing userid.
Can you put this on your list for one of the next updates please?
Thanks in advance
March 12th, 2008, 11:02 AM
You can feel free to post suggestions for Michael in the suggestions forum.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.