The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Remove Avatars if file is non-existing in local/filestorage
There were over 5.000 broken file avatars within customavatars directory of which I had to remove. But thus far, vBulletin does not support anyway to remove the attached avatars from the users if the file no longer exists on the filesystem (not database). For funsies, I've rebuild the custom avatars, and didn't work at all.
I noticed that kh99 has created a php file here: https://vborg.vbsupport.ru/showthread.php?t=281878 https://vborg.vbsupport.ru/attachmen...8&d=1335042680 But I'm afraid I'm getting a database error with it: Quote:
Quote:
|
#2
|
|||
|
|||
Anyone? I appreciate all the help I can get.
|
#3
|
||||
|
||||
Based on the code, it looks like you have entries in the customavatar table that correspond to users that have previously been deleted and those ids are what causing you problems.
If you run the following query it should remove all entries from the customavatar table that do not correspond to existing users. Code:
DELETE FROM customavatar WHERE NOT userid IN (SELECT userid FROM user) |
#4
|
|||
|
|||
Quote:
Quote:
|
#5
|
||||
|
||||
Awesome, I will be trying this shortly.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|