MyBB Community Forums

Full Version: Remove remote avatars - SQL command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I would like to ask for help - I need to remove URL for remote avatars for all users who have them set in their UCP + moreover delete avatar for these users.

All of others should not be affected (users whose have local avatars or use default avatar set in ACP).


Is there any SQL command for this? Thank you in advance
UPDATE *users
    SET avatar = '', avatardimensions = '', avatartype = ''
    WHERE avatartype IN ('gravatar', 'remote')

Note that simply disabling remote avatars in ACP prevents them from being shown and displays a notice to users (https://github.com/mybb/mybb/issues/2413).
Thank you very much! +1 added

anyway I get this error when I wanna run this command:


#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*users SET avatar = '', avatardimensions = '', avatartype = '' WHERE avatartype ' at line 1


I know about this option, but I need to solve one issue with my plugin for last post avatars (it has some compatibility issues when I disable remote avatars).
Replace * with your table prefix for MyBB.
Great, thank you! Fixed!!! +1