Find user attached to avatar


this answer refers to the *normal* avatar features in Xenforo. But in my case it's different: I have written an add-on which allows the administrator to create custom avatar galleries.
So he can upload avatars to those custom galleries and also delete them. In case of deletion I have to find the affected users in order to use XenForo_Model_Avatar::->deleteAvatar($userId).
 
It wasn't clear your question related to development.
I have moved the thread.
 
How have you associated avatars to users?

With a listener, I have overwritten XenForo_ControllerPublic_Account::actionAvatarUpload, where I fetch the avatars not from the *normal*
avatar folder, but from the custom avatar gallery.
if the administrator deletes an avatar, all attached users should be attached to the default avatar.
as far as I can see, it is easy to find the avatar attached to a user. but the other way round, finding the user(s) attached to a certain avatar, is rather tricky...
 
Sorry, I have to correct my previous posting:
With a listener, I have overwritten XenForo_ViewPublic_Account_Avatar, where I fetch the avatars from the custom avatar gallery.
if the administrator deletes an avatar, all attached users should be attached to the default avatar.
as far as I can see, it is easy to find the avatar attached to a user. but the other way round, finding the user(s) attached to a certain avatar, is rather tricky...
 
Top Bottom