XF 2.2 sql syntax to remove avatar from users

lobsterpasties

Member
Licensed customer
I have downgraded some of my users and want to remove their avatars in bulk.
Can anyone tell me how the avatars work, as I can't find any avatar infor in the database (other than date, height etc)


I want an sql query to remove a specific users avatar.
 
You can use the batch update users function in the ACP to remove avatars from member accounts which match certain criteria.
 
Additionally, it's more than just SQL if you want to keep your installation "clean". SQL could update the flag that defines if a user has an avatar, but you would be left with the actual avatar in the filesystem if you did it that way.
 
Presumably they are removed from a specific user group when their subscription expires?

If so, that is the criterion you would search on.

Even with a query you would still have to do it manually so the end result is the same.
Sorry Paul I don't understand what this means?
I can query the group to find whether they should have avatars, but the bit I can't find is the link between the avatar and the user in the database.
If I know this I won't need to do it manually.
 
It's unclear what you're trying to do.

If you are going to be manaully running a query when members are downgraded then there's no difference to using the function in the ACP.

Are you developing an add-on?

If so, I can move this thread to a more relevant forum.
 
It's unclear what you're trying to do.

If you are going to be manaully running a query when members are downgraded then there's no difference to using the function in the ACP.

Are you developing an add-on?

If so, I can move this thread to a more relevant forum.

I have a few queries which I run on the db at certain times.
These are automated and don't require manual input.
I want to remove avatars and custom titles from people who are not paying members.
I can remove the custom titles easily and that is working very nicely every morning at about 1.00, I would like to add a query to remove the avatars.

I don't know how the avatar is connected to the user, I can't find an id - and that is all I need to know, so I can remove it.
 
Back
Top Bottom